mirror of
https://github.com/kennethreitz/flask-sslify.git
synced 2026-06-05 23:00:19 +00:00
Added documentation for 301 responses
Documented the addition of the permanent parameter.
This commit is contained in:
+12
-3
@@ -38,18 +38,27 @@ Flask-SSLify also provides your application with an HSTS policy.
|
||||
|
||||
By default, HSTS is set for on year (31536000 seconds).
|
||||
|
||||
You can change the duration by passing the `age` parameter::
|
||||
You can change the duration by passing the ``age`` parameter::
|
||||
|
||||
sslify = SSLify(app, age=300)
|
||||
|
||||
If you'd like to include subdomains in your HSTS policy, set the `subdomains` parameter::
|
||||
If you'd like to include subdomains in your HSTS policy, set the ``subdomains`` parameter::
|
||||
|
||||
sslify = SSLify(app, subdomains=True)
|
||||
|
||||
|
||||
HTTP 301 Redirects
|
||||
------------------
|
||||
|
||||
By default, the redirect is issued with a HTTP 302 response. You can change that to a HTTP 301 response
|
||||
by passing the ``permanent`` parameter::
|
||||
|
||||
sslify = SSLify(app, permanent=True)
|
||||
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
Installation is simple too::
|
||||
|
||||
$ pip install Flask-SSLify
|
||||
$ pip install Flask-SSLify
|
||||
|
||||
Reference in New Issue
Block a user