
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
.. image:: https://travis-ci.org/Matt-Deacalion/django-ssl-admin.png?branch=master :target: https://travis-ci.org/Matt-Deacalion/django-ssl-admin :alt: Build Status .. image:: https://coveralls.io/repos/Matt-Deacalion/django-ssl-admin/badge.png?branch=master :target: https://coveralls.io/r/Matt-Deacalion/django-ssl-admin?branch=master :alt: Test Coverage .. image:: https://pypip.in/version/django-ssl-admin/badge.png :target: https://pypi.python.org/pypi/django-ssl-admin/ :alt: Latest Version .. image:: https://pypip.in/wheel/django-ssl-admin/badge.png?new :target: https://pypi.python.org/pypi/django-ssl-admin/ :alt: Wheel Status .. image:: https://pypip.in/license/django-ssl-admin/badge.png :target: https://pypi.python.org/pypi/django-ssl-admin/ :alt: License
Make the Django admin only available via https. For Django versions >= 1.7.
You can install django-ssl-admin
using pip::
$ pip install django-ssl-admin
To enable django-ssl-admin
you need to add it to MIDDLEWARE_CLASSES:
.. code-block:: python
MIDDLEWARE_CLASSES = (
...
'ssladmin.middleware.SSLAdmin',
....
)
If your admin path is not /admin/
you can change the ADMIN_PATH
setting like so:
.. code-block:: python
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')
Copyright © 2015 Matt Deacalion Stevens
, released under The MIT License
.
.. _Matt Deacalion Stevens: http://dirtymonkey.co.uk .. _MIT License: http://deacalion.mit-license.org
FAQs
Django middleware to make the admin https only.
We found that django-ssl-admin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.