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

Ensure CSRF_TRUSTED_ORIGINS and ALLOWED_HOSTS are specified #1308

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

jacobdgm
Copy link
Contributor

@jacobdgm jacobdgm commented Feb 8, 2024

This PR specifies a CSRF_TRUSTED_ORIGINS and ALLOWED_HOSTS in settings.py, and thus fixes #1288.

@dchiller
Copy link
Contributor

dchiller commented Feb 8, 2024

I think all of these should depend on the deployment environment. So staging.cantusdatabase.org should not be allowed on production, etc.

@jacobdgm
Copy link
Contributor Author

jacobdgm commented Feb 8, 2024

ah, and I see on line 42 that we use os.getenv to set ALLOWED_HOSTS. If we merged this change, it would overwrite that. Let me see what I can do to properly address this.

@jacobdgm
Copy link
Contributor Author

jacobdgm commented Feb 8, 2024

I made some changes. Please also refer to the "CantusDB Resources" page on the internal wiki to see the accompanying changes to the dev_env file.

@jacobdgm jacobdgm merged commit 9a9507e into DDMAL:develop Feb 9, 2024
@jacobdgm jacobdgm deleted the 1288-allowed-hosts branch February 9, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We should make sure our ALLOWED_HOSTS is complete
2 participants