Closed AntonDnepr closed 4 years ago
Cors not working for frontend. Proposed chat solution:
from corsheaders.defaults import default_headers CORS_ORIGIN_ALLOW_ALL = env.bool("CORS_ORIGIN_ALLOW_ALL", default=False) CORS_ORIGIN_WHITELIST = CSRF_TRUSTED_ORIGINS = env.list("CORS_ORIGIN_WHITELIST") CORS_ALLOW_CREDENTIALS = True CORS_ALLOW_HEADERS = default_headers + ( "If-None-Match", "Last-Modified", "Accept-Language", "If-Modified-Since", "Access-Control-Allow-Origin", ) CORS_EXPOSE_HEADERS = ( "ETag", "Last-Modified", "HTTP_X_RESPONSE_ID", "HTTP_GIT_BRANCH", "Access-Control-Expose-Headers", )
Should work after https://github.com/pixelpassion/django-rest-boilerplate/pull/22
😱 What is happening? What did you expect instead?
Cors not working for frontend. Proposed chat solution:
☝️ Steps to reproduce
🐛 More details (Sentry link, etc.)
🚨 Priority