Suggest only one package, change the sourcecode block to none
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Lowell Abbott · committed by Lowell Abbott · parent c47f453 · Browse files · 1 file·+14 added−54 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+14 added−54 removed
- other:+14 added−54 removed
Provenance
- Commit
ee7cb9d- Tree
f56b686- Author
Lowell Abbott <lowell.abbott@gmail.com>- Committer
Lowell Abbott <lowell.abbott@gmail.com>- Parent
c47f453
1 file changed+14 added−54 removed
modified:docs/security.rst+14 added-54 removed
103 unmodified lines104 <https://github.com/pallets/flask/issues/248#issuecomment-59934857>`_, so105 this behavior was changed and :func:`~flask.jsonify` now supports serializing106 arrays.107 108-109-SSL/HTTPS110----------111-112-For implementing HTTPS on your server.113-114-Below are some packages that implement this protocol:115-116-* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_117-* `flask-sslify <https://github.com/kennethreitz/flask-sslify>`_118-* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_119-108 Security Headers109 ----------------110 123-This section contains a list of headers supported by Flask and some packages that implements them.111+This section contains a list of headers supported by Flask.112+To configure HTTPS and handle the headers listed below we suggest the package `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`. 113 114 Content Security Policy (CSP)126------------------------------------------------------------------------------115+-----------------------------116 117 Enhance security and prevents common web vulnerabilities such as cross-site scripting and MITM related attacks.118 119 Example:120 132-.. sourcecode:: html121+.. sourcecode:: none122 123 Content-Security-Policy: default-src https:; script-src 'nonce-{random}'; object-src 'none'124 136-125 See also `Content Security Policy <https://csp.withgoogle.com/docs/index.html>`_.126 139-* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_140-* `flask-csp <https://github.com/twaldear/flask-csp>`_141-* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_142-127 HTTP Strict Transport Security (HSTS)144-------------------------------------------------------------------------------------------------------------------------------128+-------------------------------------129 130 Redirects http requests to https on all urls, preventing MITM attacks.131 132 Example:133 150-.. sourcecode:: html134+.. sourcecode:: none135 136 Strict-Transport-Security: max-age=<expire-time 137 Strict-Transport-Security: max-age=<expire-time>; includeSubDomains 138 Strict-Transport-Security: max-age=<expire-time>; preload 139 140 See also `Strict Transport Security <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security>`_. 141 158-* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_159-* `flask-sslify <https://github.com/kennethreitz/flask-sslify>`_160-* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_161-142 X-FRAME-OPTIONS (Clickjacking protection)163--------------------------------------------------------------------------------------------------------------------------143+-----------------------------------------144 145 Prevents the client from clicking page elements outside of the website, avoiding hijacking or UI redress attacks.146 167-.. sourcecode:: html147+.. sourcecode:: none148 149 X-Frame-Options: DENY 150 X-Frame-Options: SAMEORIGIN151 X-Frame-Options: ALLOW-FROM https://example.com/152 153 See also `X-Frame-Options <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options>`_. 154 175-* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_176-* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_177-155 X-Content-Type-Options179--------------------------------------------------------------------------------------------------------------156+----------------------157 158 Prevents XSS by blocking requests on clients and forcing them to read the content type instead of first opening it.159 183-.. sourcecode:: html160+.. sourcecode:: none161 162 X-Content-Type-Options: nosniff163 164 See also `X-Content-Type-Options <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options>`_. 165 189-* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_190-* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_191-166 Cookie options193-----------------------------------------------------------------------------------------------------------167+--------------168 169 For setting cookies on client-side storage.170 171 Example:172 199-.. sourcecode:: html173+.. sourcecode:: none174 175 Set-Cookie: [cookie-name]=[cookie-value] 176 177 See also `HTTP cookies <https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies>`_ .178 205-* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_206-* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_207-179 HTTP Public Key Pinning (HPKP)209--------------------------------------------------------------------------------------------------------180+------------------------------181 182 For associating clients with web servers through a certificate key and prevent MITM attacks.183 184 Example:185 215-.. sourcecode:: html186+.. sourcecode:: none187 188 Public-Key-Pins: pin-sha256="base64=="; max-age=expireTime [; includeSubDomains][; report-uri="reportURI"] 189 190 See also `Public Key Pinning <https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning>`_.220-221-* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_222-* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_223-224-References225------------226-227-* https://docs.djangoproject.com/en/1.11/topics/security/228-* https://blog.appcanary.com/2017/http-security-headers.html229-* https://developer.mozilla.org230-* https://csp.withgoogle.com/docs/index.html