Skip to main content

A simple Django app to restrict http methods to specific origin

Project description

=====
DJANGO-RESTRICTMETHODORIGIN
=====

DJANGO-RESTRICTMETHODORIGIN is a simple Django app to bind origins with http methods.
So that its possible to allow ony speicific origins to make speicific http requests like POST, GET, PUT etc.


Quick start
-----------

1. Add "restrictmethodorigin" to your INSTALLED_APPS setting like this:

INSTALLED_APPS = [
...
'restrictmethodorigin',
]

2. Add "OriginRestrictor" to your MIDDLEWARE like this:
MIDDLEWARE = [
...
'restrictmethodorigin.base.OriginRestrictor'
]

3. In settings.py create a dictionary METHOD_ORIGIN like this:
METHOD_ORIGIN = { 'POST': ['127.0.0.1'],
'PUT': ['127.0.0.1','127.0.0.2'] }



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-restrictmethodorigin, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_restrictmethodorigin-0.1.1-py2.py3-none-any.whl (4.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page