Django middleware to make the admin https only.
Project description
Make the Django admin only available via https. Only for the very latest versions of Django (>= 1.7).
Installation
You can install django-ssl-admin using pip:
$ pip install django-ssl-admin
And to enable you need to add it to MIDDLEWARE_CLASSES:
MIDDLEWARE_CLASSES = (
...
'ssladmin.middleware.SSLAdmin',
....
)
If your admin path is not /admin/ you can change the ADMIN_PATH setting like so:
ADMIN_PATH = '^/staff/'
If you have a reverse proxy set up remember to let Django know how it can detect a secure connection, e.g.:
.. code-block:: python
SECURE_PROXY_SSL_HEADER = (‘HTTP_X_SCHEME’, ‘https’)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-ssl-admin-1.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for django_ssl_admin-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df16e99609009656dd43642b6ee7140324c0f16b7d6a1c68bf6fb7b73760191c |
|
MD5 | f82251715970699ccd01382c73dc30bb |
|
BLAKE2b-256 | 4fd3d50a6cc8d4a251333fc72712a84dbdc200d2579a426768d9912b5ef624e2 |