Skip to main content

Django middleware to make the admin https only.

Project description

Build Status Test Coverage Latest Version Wheel Status License

Make the Django admin only available via https. For Django versions >= 1.7.

Installation

You can install django-ssl-admin using pip:

$ pip install django-ssl-admin

Usage

To enable django-ssl-admin 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.:

SECURE_PROXY_SSL_HEADER = ('HTTP_X_SCHEME', 'https')

License

Copyright © 2015 Matt Deacalion Stevens, released under The MIT License.

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.4.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

django_ssl_admin-1.1.4-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-ssl-admin-1.1.4.tar.gz.

File metadata

File hashes

Hashes for django-ssl-admin-1.1.4.tar.gz
Algorithm Hash digest
SHA256 eddb90418b2f4648029e1e68244a1cca59edbddc82e50601fbb4da71029f8626
MD5 f36578e361bfa616b4094a2fe0134e32
BLAKE2b-256 ce5c4a001ea3769ac20ad83b0638513c2ece2bd3b3490bf4134b25bcac96fc49

See more details on using hashes here.

File details

Details for the file django_ssl_admin-1.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_ssl_admin-1.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ea3402f5617c6004c58b78ba93d5de3f162e98868e66e7d79359d6e3de67c3c9
MD5 e87d33497e8278f9d76418eb2fae6433
BLAKE2b-256 2c0fb514a5408a49f4dfb329f30fc011033e3a533eedba0e0ea1e9c5f8d90b86

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page