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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_restrictmethodorigin-0.1.1-py2.py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page