diff --git a/backend/aiproject/settings.py b/backend/aiproject/settings.py index 5b10632e..2c4cf2b7 100644 --- a/backend/aiproject/settings.py +++ b/backend/aiproject/settings.py @@ -15,6 +15,7 @@ import dj_database_url import environ from corsheaders.defaults import default_headers +from socket import gethostbyname, gethostname env = environ.Env() @@ -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", ]