Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(proxy) hop-by-hop headers to not clear upgrade header on upgrade (#…
…5495) ### Summary `HTTP` `Connection` header usually carries a list of `headers` meant for receiver (in this case proxy) that are not meant to be proxied further (so called hop-by-hop headers). Our gateway correctly cleans these headers, but it was a bit too aggressive. It turns out as reported on #5465 that websockets upgrade mechanism is broken with Firefox, but works on Chrome. The difference being that Chrome sends following headers: ```http Connection: Upgrade Upgrade: websocket ``` while Firefox sends the following: ``` Connection: keep-alive, Upgrade Upgrade: websocket ``` As the `Upgrade` was listed on `Connection` header by Firefox, the Kong incorrecly removed the `Upgrade` header from the upstream headers, and thus it made the websockets upgrade to fail. This PR fixed it so that we do not remove `Upgrade` header on such case. This PR also adds `keep-alive` to upstream request `Connection` header when proxying the upgrade request (just like Firefox does). ### Issues Resolved Fix #5465
- Loading branch information