Metadata-Version: 2.0
Name: django-restrictmethodorigin
Version: 0.1.1
Summary: A simple Django app to restrict http methods to specific origin
Home-page: https://github.com/Ruhshan/django-restrictmethodorigin
Author: Ruhshan Ahmed Abir
Author-email: ruhshan.ahmed@gmail.com
License: MIT
Description-Content-Type: UNKNOWN
Keywords: django restrictmethod origin
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.10
Classifier: Framework :: Django :: 1.11
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Python: >=3

=====
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'] }



