Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose search time headers to the browser #3802

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = [
obulat marked this conversation as resolved.
Show resolved Hide resolved
"cf-cache-status",
"cf-ray",
"date",
]
Comment on lines +52 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you leave a comment here that these are required for the analytics events to work?


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