Skip to content

Commit

Permalink
add cors support
Browse files Browse the repository at this point in the history
  • Loading branch information
yarray committed May 13, 2015
1 parent 89bd4cb commit 19f7fe9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions avipost/avipost/settings/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
"""
from .ci_stubbed_prod import *

CORS_ORIGIN_ALLOW_ALL = True
INSTALLED_APPS += ('autofixture',)
11 changes: 10 additions & 1 deletion avipost/avipost/settings/prod.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
from .base import *

# TODO: set the database parameters
INSTALLED_APPS += (
'corsheaders',
)

# need to be before django.middleware.common.CommonMiddleware
MIDDLEWARE_CLASSES = (
'corsheaders.middleware.CorsMiddleware',
) + MIDDLEWARE_CLASSES

# TODO: set the database parameters
1 change: 1 addition & 0 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ psycopg2==2.6
requests==2.6.0
wsgiref==0.1.2
Unipath==1.1
django-cors-headers==1.0.0

0 comments on commit 19f7fe9

Please sign in to comment.