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'] }
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
Release history Release notifications | RSS feed
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
File details
Details for the file django_restrictmethodorigin-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: django_restrictmethodorigin-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76a34c7036d3d7427b3e102222816e4301a4f4ded548adc97faf0bc9b1a863dd |
|
MD5 | c561c1e8d9d1b921e8f9570112c61805 |
|
BLAKE2b-256 | 17ac728b96057cabf83f43a28d32ef4b15aec66bb668d8f360cc7fded41cfafb |