reverseproxy: Fix check for header_up Host {upstream_hostport} redundancy#7564
reverseproxy: Fix check for header_up Host {upstream_hostport} redundancy#7564yubiuser wants to merge 3 commits intocaddyserver:masterfrom
header_up Host {upstream_hostport} redundancy#7564Conversation
Signed-off-by: yubiuser <github@yubiuser.dev>
|
The change is not quite right, it needs to take into account that hostport is only passed for HTTPS and not HTTP. |
Signed-off-by: yubiuser <github@yubiuser.dev>
|
Thanks, you're correct. I've added a commit that checks if the |
mholt
left a comment
There was a problem hiding this comment.
This LGTM. Any other changes needed @francislavoie ?
|
It's technically not whether the scheme is |
|
Ok yeah that's a good point. @yubiuser how would you feel about changing that? |
|
I'll look into it, but I'm not familiar with the code base so I might miss some of the possible transport options to enable TLS. |
|
Basically the logic would need to be moved around line 884 where (after the big |
Signed-off-by: yubiuser <github@yubiuser.dev>
|
Thanks for the hint. I moved the check into the TLS section and used Do you want me to squash the commits into a single one? |
|
CI test fail due to Should those issues be addressed in a separate PR? |
|
Thanks! No need to squash, we'll squash on merge. We'll fix the lint separately then rebase and merge this when we're ready. |
header_up Host {upstream_hostport} redundancy
PR #7454 changed the header from
header_up Host {hostport}toheader_up Host {upstream_hostport}whenreverse_proxyfor HTTPS.However, the PR forgot to change a parser check to the new default. This results in logspam when users revert to the old behavior setting
header_up Host {hostport}. Caddy starts to warn about unnecessary header_up being doubled - while this is not true anymore.No AI was used.