diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 8107ae29e4..f9070bd385 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -252,6 +252,7 @@ TEMPLATES = [ MIDDLEWARE_CLASSES = ( # NOQA 'awx.main.middleware.TimingMiddleware', 'awx.main.middleware.MigrationRanCheckMiddleware', + 'corsheaders.middleware.CorsMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', @@ -284,6 +285,7 @@ INSTALLED_APPS = ( 'polymorphic', 'taggit', 'social_django', + 'corsheaders', 'awx.conf', 'awx.main', 'awx.api', diff --git a/docs/licenses/django-cors-headers.txt b/docs/licenses/django-cors-headers.txt new file mode 100644 index 0000000000..a62cfe9261 --- /dev/null +++ b/docs/licenses/django-cors-headers.txt @@ -0,0 +1 @@ +Copyright 2017 Otto Yiu and other contributors http://ottoyiu.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/requirements/requirements.in b/requirements/requirements.in index a170668161..5f3df108a2 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -8,6 +8,7 @@ daphne==1.3.0 # Last before backwards-incompatible channels 2 upgrade defusedxml==0.5.0 # py36 support https://github.com/tiran/defusedxml/pull/4 Django==1.11.16 django-auth-ldap==1.7.0 +django-cors-headers==2.4.0 django-crum==0.7.2 django-extensions==2.0.0 django-jsonfield==1.0.1 diff --git a/requirements/requirements.txt b/requirements/requirements.txt index e6379ca007..007619d0fe 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -78,6 +78,7 @@ pyrad==2.1 # via django-radius pysocks==1.6.8 python-dateutil==2.7.2 python-ldap==3.1.0 # via django-auth-ldap +django-cors-headers==2.4.0 python-logstash==0.4.6 python-memcached==1.59 python3-openid>=3.0.10 # via social-auth-core