Commit 35eff1c
committed
Fix proxy redirect losing /api/ prefix and port on trailing-slash redirects
FastAPI issues 307 redirects to add trailing slashes (e.g. /editor/create_flow
→ /editor/create_flow/). When proxy_set_header Host $host was used, the
redirect Location header used the external hostname without port
(http://192.168.50.176/editor/create_flow/), bypassing both the /api/
prefix and the correct port (8080).
Fix by removing the Host override so nginx uses the default $proxy_host
(flowfile-core:63578). Now the backend's redirect points to the internal
host, and nginx's built-in proxy_redirect default correctly rewrites it
to http://<external-host>:8080/api/editor/create_flow/.
Also remove premature WebSocket headers (Connection: "upgrade" was being
sent on all requests) and add X-Forwarded-Host so the backend can access
the original host if needed.
https://claude.ai/code/session_01HtZJr4MnVSYw8MGuqgKiTq1 parent e97e7c5 commit 35eff1c
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
0 commit comments