Skip to content

Commit

Permalink
Expose search time headers to the browser (#3802)
Browse files Browse the repository at this point in the history
* Expose search time headers to the browser

Signed-off-by: Olga Bulat <[email protected]>

* Add comment for the headers

---------

Signed-off-by: Olga Bulat <[email protected]>
  • Loading branch information
obulat authored Feb 22, 2024
1 parent d460936 commit 625a6bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/conf/settings/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@
if middleware not in MIDDLEWARE:
MIDDLEWARE.insert(0, middleware)

CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_ALL_ORIGINS = True
# https://github.com/adamchainz/django-cors-headers?tab=readme-ov-file#cors_expose_headers-sequencestr
# These headers are required for search response time analytics
CORS_EXPOSE_HEADERS = [
"cf-cache-status",
"cf-ray",
"date",
]

# Proxy handling, for production
if config("IS_PROXIED", default=True, cast=bool):
Expand Down

0 comments on commit 625a6bc

Please sign in to comment.