Skip to content

Commit

Permalink
Add private ip to allowed_hosts setting to enable load balancer healt…
Browse files Browse the repository at this point in the history
…h checks
  • Loading branch information
dakotabenjamin committed Oct 1, 2024
1 parent b3ddb18 commit 81ab077
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/aiproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import dj_database_url
import environ
from corsheaders.defaults import default_headers
from socket import gethostbyname, gethostname

env = environ.Env()

Expand All @@ -36,7 +37,7 @@
default="https://api-prod.raw-data.hotosm.org/v1",
)

ALLOWED_HOSTS = ["localhost", "127.0.0.1", HOSTNAME]
ALLOWED_HOSTS = ["localhost", "127.0.0.1", HOSTNAME, gethostbyname(gethostname())]
CORS_ALLOW_HEADERS = list(default_headers) + [
"access-token",
]
Expand Down

0 comments on commit 81ab077

Please sign in to comment.