El Barto
El Barto

Reputation: 21

Deploying Django API with Render keeps loging 400 bad request

I am trying to host my Django API with renders free tier I have specified all the env variables including renders domain in allowed origins but I still get 400 Bad Request responses from renders logs.

logs: 127.0.0.1 - - [24/Feb/2025:22:47:56 +0300] "HEAD / HTTP/1.1" 400 143 "-" "Go-http-client/1.1" ==> Your service is live 🎉 127.0.0.1 - - [24/Feb/2025:22:48:09 +0300] "GET / HTTP/1.1" 400 143 "-" "Go-http-client/2.0"

my settings.py

ALLOWED_HOSTS = env.list("ALLOWED_HOSTS")

CSRF_TRUSTED_ORIGINS = env.list("TRUSTED_ORIGINS")

CORS_ALLOWED_ORIGINS = env.list("CORS_ALLOWED_ORIGINS")

all env variables are supplied on renders environment tab but it still fails

Upvotes: 0

Views: 20

Answers (0)

Related Questions