Skip to content

Commit

Permalink
Merge pull request #283 from hotosm/ecs-health-check-allowed-host
Browse files Browse the repository at this point in the history
Add private ip to allowed_hosts setting to enable load balancer healt…
  • Loading branch information
kshitijrajsharma authored Oct 1, 2024
2 parents b3ddb18 + 81ab077 commit a2a4054
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 a2a4054

Please sign in to comment.