Commit e6235e51 by Tyler Hallada Committed by GitHub

Merge pull request #153 from edx/thallada/allowed-hosts

Add "analyticsapi" to local ALLOWED_HOSTS setting
parents b38ecd3c 1818db49
......@@ -48,7 +48,7 @@ class Command(BaseCommand):
'--course_id',
action='store',
dest='course_id',
default='course-v1:edX+DemoX+Demo_Courset',
default='course-v1:edX+DemoX+Demo_Course',
help='Course ID for which to generate fake data',
)
parser.add_argument(
......
......@@ -67,4 +67,11 @@ SWAGGER_SETTINGS = {
LMS_BASE_URL = 'http://localhost:8000/' # the base URL for your running local LMS instance
COURSE_BLOCK_API_AUTH_TOKEN = 'paste auth token here' # see README for instructions on how to configure this value
# In Insights, we run this API as a separate service called "analyticsapi" to run acceptance/integration tests. Docker
# saves the service name as a host in the Insights container so it can reach the API by requesting http://analyticsapi/.
# However, in Django 1.10.3, the HTTP_HOST header of requests started to be checked against the ALLOWED_HOSTS setting
# even in DEBUG=True mode. Here, we add the Docker service name "analyticsapi" to the default set of local allowed
# hosts.
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '::1', 'analyticsapi']
########## END ANALYTICS DATA API CONFIGURATION
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment