HTTP ERROR 400

Immich 1.81.1 External Postgresql and external proxy Podman on Rocky Linux (RHEL) Although I don't use the builtin nginx proxy, I copied all the proxy settings to a separate nginx container and added TLS termination and http3. nginx version is 1.25.2 When loading immich in Edge, I get "http 400 error". Clearing browser data solves very briefly. Immich doesn't load completely.
7 Replies
bo0tzz
bo0tzz2y ago
Can you post the containers' logs?
Schuppenzot
SchuppenzotOP2y ago
which container?
bo0tzz
bo0tzz2y ago
Any ones that have anything that looks like an error :P
Immich
Immich2y ago
This sounds like it could be a reverse proxy issue. Here's a link to the relevant documentation page: https://docs.immich.app/docs/administration/reverse-proxy.
bo0tzz
bo0tzz2y ago
Also have a look at that page
Schuppenzot
SchuppenzotOP2y ago
I happily believe it's a proxy issue. And I believe it appeared when upgrading the nginx image. But now I need to solve it anyway I'll increase the nginx logging level to find out more nginx logs showed a lot of http3 errors. I disabled http3/quic and it works again. not an immich issue (although http3 works with the very same setup on homeassistant and jellyfin) so, I manged to fix it. Well, I basically just used the homeassistant proxy setup for Immich.
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
instead of
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $forwarded_protocol;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $forwarded_protocol;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
So I removed proxy_set_header X-Forwarded-Host $http_host; and proxy_set_header X-Forwarded-Proto $forwarded_protocol; Apparently, these don't work well on nginx/http3 Are they needed for Immich to work properly? Something else I spotted: [hooks.server.ts]:handleError Not found: /service_worker.js
Schuppenzot
SchuppenzotOP2y ago
GitHub
Error 400 when using external nginx proxy with http3 · immich-app i...
If you, like me, have externalized the nginx proxy container and you want to use http3, you should comment out this line in your config: proxy_set_header X-Forwarded-Proto $forwarded_protocol; This...

Did you find this page helpful?