Commit 75425ad
Restrict subdomain preservation to same-domain proxy configs
The previous fix unconditionally prepended the subdomain prefix to
proxyHost, which broke dev setups using an internal proxy hostname
(e.g. PROXY_HOST=nginx): admin.localhost was rewritten to admin.nginx
instead of nginx, which doesn't resolve in Docker.
Only preserve the subdomain when proxyHost equals host (the production
case where both are the same domain). In that case the HTTP client would
otherwise reuse an existing connection with SNI=host for the subdomain
request, causing nginx to return 421 Misdirected Request.
Update test to reflect the correct behaviour for the internal-proxy case.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent bfed8ec commit 75425ad
2 files changed
Lines changed: 8 additions & 5 deletions
File tree
- src
- main/java/com/atomgraph/linkeddatahub/client/filter
- test/java/com/atomgraph/linkeddatahub/client/filter
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | | - | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | | - | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
0 commit comments