Skip to content
Myr

Fix typos, semantics and some other corrections

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 8459ced · Browse files · 1 file+20 added−23 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+20 added−23 removed

  • other:+20 added−23 removed

1 file+20 added−23 removed

modified:docs/security.rst+20 added-23 removed
107 unmodified lines
108109SSL/HTTPS110---------111112For implementing HTTPS on your server112For implementing HTTPS on your server.113114Below some packages in suggestion order that implements this protocol:114Below are some packages that implement this protocol:115116* `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>`_119120Security Headers121----------------122123This sections contains sections headers supported by Flask and a list of packages in suggestion order that implements it123This section contains a list of headers supported by Flask and some packages that implements them.124125`Content Security Policy <https://csp.withgoogle.com/docs/index.html>`_ (CSP)126-----------------------------------------------------------------------------127128For enhancing security and preventing common web vulnerabilities such as cross-site scripting and MITM related attacks128Enhance security and prevents common web vulnerabilities such as cross-site scripting and MITM related attacks.129130Example130Example:131132.. sourcecode:: html133 134 Content-Security-Policy: default-src https:; script-src 'nonce-{random}'; object-src 'none'135136137To learn more check `this <https://csp.withgoogle.com/docs/index.html>`_137See also `Content Security Policy <https://csp.withgoogle.com/docs/index.html>`_.138139* `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>`_142143`HTTP Strict Transport Security <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security>`_ (HSTS)144------------------------------------------------------------------------------------------------------------------------------145146Redirects http requests to https on all urls, preventing MITM attacks.147147For automatically redirect HTTP to HTTPS on all the website url's and prevent MITM attacks148Example:149149Example150150.. sourcecode:: html151 152 Strict-Transport-Security: max-age=<expire-time 153 Strict-Transport-Security: max-age=<expire-time>; includeSubDomains 154 Strict-Transport-Security: max-age=<expire-time>; preload 155157To learn more check `this <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security>`_ 156See also `Strict Transport Security <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security>`_. 157159158* `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>`_161162`X-FRAME-OPTIONS <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options>`_ (Clickjacking protection)163-------------------------------------------------------------------------------------------------------------------------166Prevents the client clicking page elements outside of the website avoiding hijacking or UI redress attacks164165Prevents the client from clicking page elements outside of the website, avoiding hijacking or UI redress attacks.166167.. sourcecode:: html168 169 X-Frame-Options: DENY 170 X-Frame-Options: SAMEORIGIN171 X-Frame-Options: ALLOW-FROM https://example.com/172175To learn more check `this <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security>`_ 173See also `X-Frame-Options <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options>`_. 174175* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_176* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_177178`X-Content-Type-Options <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options>`_179-------------------------------------------------------------------------------------------------------------180183Prevents XSS by blocking requests on clients and forcing then to read the content type instead of first opening it.181Prevents XSS by blocking requests on clients and forcing them to read the content type instead of first opening it.182183.. sourcecode:: html184 185 X-Content-Type-Options: nosniff186189To learn more check `this <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options>`_ 187See also `X-Content-Type-Options <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options>`_. 188191189* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_190* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_191192`Cookie options <https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies>`_193----------------------------------------------------------------------------------------------------------194198For setting cookies on client-side storage195For setting cookies on client-side storage.196200Example197Example:198199.. sourcecode:: html200 201 Set-Cookie: [cookie-name]=[cookie-value] 202206To learn more check `this <https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies>`_203See also `HTTP cookies <https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies>`_ .204205* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_206* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_207208`HTTP Public Key Pinning <https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning>`_ (HPKP)209-------------------------------------------------------------------------------------------------------210214For associating clients with web servers throught a certificate key and prevent MITM attacks211For associating clients with web servers through a certificate key and prevent MITM attacks.212216Example213Example:214215.. sourcecode:: html216217 Public-Key-Pins: pin-sha256="base64=="; max-age=expireTime [; includeSubDomains][; report-uri="reportURI"] 218222To learn more check `this <https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning>`_219See also `Public Key Pinning <https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning>`_.220221* `flask-talisman <https://github.com/GoogleCloudPlatform/flask-talisman>`_222* `flask-secure-headers <https://github.com/twaldear/flask-secure-headers>`_223227References:224References225-----------226227* https://docs.djangoproject.com/en/1.11/topics/security/228* https://blog.appcanary.com/2017/http-security-headers.html
2 unmodified lines