Commit e3420f8
committed
fix: add x-forwarded-proto header to internal whoami httpCall
Envoy automatically appends x-forwarded-for to all outgoing requests,
including Lua httpCall subrequests. Synapse treats any request carrying
x-forwarded-for as a forwarded client request and warns when
x-forwarded-proto is absent, falling back to https assumption.
The whoami lookup is an internal Envoy subrequest, not a proxied client
request, so ideally it would carry neither forwarded header. However,
x-forwarded-for cannot be suppressed from a Lua httpCall — Envoy adds it
unconditionally. Overwriting x-forwarded-for with 127.0.0.1 would be
semantically cleaner but would discard potentially useful origin info if
Synapse ever uses it beyond this check.
Adding x-forwarded-proto: https is the minimal fix: it completes the
forwarded header pair, silences the warning, and keeps the request
headers consistent without masking the original IP.1 parent d7b413c commit e3420f8
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
0 commit comments