Skip to main content

bpssl is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view ‘/login’ is recieved over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page.

Specifying views and urls as secure is supported as are flatpages. Fastcgi and HTTP proxy setups are also well supported. See the documentation at:

bpssl draws inspiration from the well known SSL Middleware snippets on djangosnippets.org. It roughly supports the features of the following snippets:

Please file bugs at: http://bitbucket.org/beproud/bpssl/issues/

Middleware

bpssl provides an SSLRedirectMiddleware which can redirect users from secure pages to non-secure pages and visa-versa. Urls are set up by adding regular expressions to the SSL_URLS setting in settings.py. SSLRedirectMiddleware can also be extended to support more specific use cases.

ssl_view decorator

bpssl provides an ssl_view() decorator which can be used instead of the SSL_URLS to specify that a particular view should be secure.

Development

Generally you will want to develop bpssl in a virtualenv with pip:

$ mkvirtualenv bpssl

You can install the requirements using the requirements.txt and pip:

$ pip install -r setup/requirements.txt

And run tests normally using setup.py:

$ python setup.py test

CHANGES

1.0.3

  • Support for tests running up to Django 1.7 and Python 3.4

1.0.2

  • Fixed issue with get_host() function in Django 1.5

1.0.1

  • Fixed SSL_REQUEST_HEADER setting to use the custom setting, if available (Thanks Gabriel Grant)

1.0

  • Initial Release

Release files for bpssl 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bpssl 1.0.3
File Size Uploaded
bpssl-1.0.3.tar.gz 53.6 kB Details

Release files / bpssl-1.0.3.tar.gz

Download URL bpssl-1.0.3.tar.gz
Size 53.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7e232461e0986e218a78f542ec2796991ad8838e64fe06ea447ad1193302739e
BLAKE2b-256 checksum
How to use checksums
650104e70ab98669715300875a06917e2f8425904002615c6429dc448571ec5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page