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.

Files for django-ssl-admin, version 1.1.4
Filename, size File type Python version Upload date Hashes
Filename, size django_ssl_admin-1.1.4-py2.py3-none-any.whl (4.7 kB) File type Wheel Python version 3.4 Upload date Hashes View
Filename, size django-ssl-admin-1.1.4.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page