Form submission redirects to localhost:8080
levkk opened this issue · 1 comments
levkk commented
I'm running Blazer using the Docker image on EC2 and accessing it via the Internet. Everything works great except form submission redirects to localhost:8080
(the default host Blazer is running on) instead of the URL in the browser.
I'm running Blazer behind nginx using the default command suggested in the README:
docker run -e DATABASE_URL=... -e BLAZER_USERNAME=... -e BLAZER_PASSWORD=... ankane/blazer:latest
I probably need to set the host somewhere, but it's not obvious from looking at the Blazer repo or this one where that config could be.
levkk commented
Figured it out. I just need to forward the Host
header to Blazer from nginx:
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:8080;
}