Skip to content

Commit

Permalink
We don't want the API to serve static in production. So we are forcin…
Browse files Browse the repository at this point in the history
…g the renderer to be JSON only. (RyanNoelk#166)
  • Loading branch information
RyanNoelk authored Mar 14, 2017
1 parent 7e0bad9 commit 8e19351
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/base/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@
'PAGE_SIZE': 100
}

# We don't want the API to serve static in production.
# So we are forcing the renderer to be JSON only.
if not DEBUG:
REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = (
'rest_framework.renderers.JSONRenderer',
)

CORS_ORIGIN_WHITELIST = (
os.environ.get('NODE_URL', 'localhost:8080')
)
Expand Down

0 comments on commit 8e19351

Please sign in to comment.