This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A middleware that secures URLS.

Project Description
Django SSL Redirect
===================

Django SSL Redirect is a middleware that ensures secured URLs and only secured URLs are accessed securely over HTTPS.

Installation
------------

Run `pip install django-ssl-redirect`

Add `ssl_redirect.middleware.SSLRedirectMiddleware` to the top of your MIDDLEWARE_CLASSES setting:

```python
MIDDLEWARE_CLASSES = (
'ssl_redirect.middleware.SSLRedirectMiddleware',
...
)
```

Securing Views
--------------
To secure a view simply add `'SSL': True` the views kwargs

```python
urlpatterns = patterns('my_app.views',
url(r'^secure/path/$', 'secure_view', {'SSL':True}),
)
```

You can always ensure a view is not served over SSL with `'SSL': True`

```python
urlpatterns = patterns('my_app.views',
url(r'^unsecure/path/$', 'secure_view', {'SSL': False}),
)
```

Settings
--------
`SSL_ON (default True)`
Use SSL redirects. This setting overrides all other settings.

`SSL_ALWAYS (default False)`
Use SSL throughout the entire site.

`HTTPS_PATHS (default [])`
A list of secure paths.

`SSL_PORT (default None)`
Port number of the SSL connection. If the value is not None it will be appended after the host.
Release History

Release History

This version
History Node

2.0

History Node

1.0

History Node

0.1.1a2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-ssl-redirect-2.0.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source May 24, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting