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

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file django_restrictmethodorigin-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_restrictmethodorigin-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 76a34c7036d3d7427b3e102222816e4301a4f4ded548adc97faf0bc9b1a863dd
MD5 c561c1e8d9d1b921e8f9570112c61805
BLAKE2b-256 17ac728b96057cabf83f43a28d32ef4b15aec66bb668d8f360cc7fded41cfafb

See more details on using hashes here.

Supported by

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