outposts/proxy: add X-Forwarded-Host since Host now gets changed by the proxy

closes #2284

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-02-10 23:09:55 +01:00
parent cc42830e23
commit 1f838bb2aa
4 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,7 @@ func TestProxy_ModifyRequest(t *testing.T) {
}
a.proxyModifyRequest(u)(req)
assert.Equal(t, "frontend", req.Header.Get("X-Forwarded-Host"))
assert.Equal(t, "/foo", req.URL.Path)
assert.Equal(t, "backend:8012", req.URL.Host)
assert.Equal(t, "backend:8012", req.Host)