Skip to content

Conversation

@crankynetman
Copy link
Collaborator

Django ALLOWED_HOSTS (in production) needs to be set in your SCRAM install to allow connections from the django container (for docker compose healthcheck) and the hostname of your actual server (for nginx proxied traffic, like a user hitting the WUI, API calls, etc). So for a typical SCRAM server deployed to production at scram.example.com you would need ALLOWED_HOSTS to be set to ALLOWED_HOSTS = ["django", "scram.example.com"].

This uses the django-environ list type casting to take the DJANGO_ALLOWED_HOSTS env var and set it to the correct value, for example setting the env var on the system with export DJANGO_ALLOWED_HOSTS=django,scram.example.com would result in this in the python settings: ALLOWED_HOSTS = ["django", "scram.example.com"]

@crankynetman crankynetman marked this pull request as ready for review November 11, 2024 21:39
Copy link
Collaborator

@samoehlert samoehlert left a comment

Choose a reason for hiding this comment

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

This has been much needed, thanks Chris

@crankynetman crankynetman merged commit 147a21c into develop Nov 11, 2024
@crankynetman crankynetman deleted the hotfix/allowed_hosts branch November 11, 2024 21:43
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.

3 participants