-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): support inbound and outbound Via header #12733
feat(core): support inbound and outbound Via header #12733
Conversation
Will add tests to spec/02-integration/05-proxy/03-upstream_headers_spec.lua |
1e45f29
to
dcbe2db
Compare
dcbe2db
to
cd54a0e
Compare
986762e
to
12a5655
Compare
This is for |
This is for |
62e2459
to
85521bf
Compare
Just did a rebase and waiting for CI. |
A couple of comments:
|
@outsinre also things like these: |
0bade6e
to
308c1c7
Compare
According to [RFC7230](https://datatracker.ietf.org/doc/html/rfc7230#section-5.7.1) and [RFC9110](https://datatracker.ietf.org/doc/html/rfc9110#name-via), Kong gateway MUST append protocol name (optional), protocol version and host (or pseudonym) information when forwarding HTTP messages from clients to upstreams. Currently, Kong just ignores this part. And optionally append the information when forwarding messages in the reverse direction, depending on the `headers` configuration in "kong.conf". Currently, Kong blindly overrides the response `Via` header with server token. This PR do the following work. 1. Append inbound info like `1.1 kong/3.8.0`, and outbound info like `1.1 kong/3.8.0`. 2. Supports gRPC and gRPCs protocols, like inbound `2 kong/3.8.0` and outbound `2 kong/3.8.0`. 3. When the upstream does not include the `Server` header, it inserts one like `kong/3.8.0`. 4. Fix `Via` assignment of `aws-lamdba` and `azure-function` plugins.
a69e7f4
to
c314e90
Compare
Co-authored-by: Chrono <chrono_cpp@me.com>
Successfully created cherry-pick PR for |
Summary
According to RFC7230 and RFC9110 gateway MUST append protocol, version and host (or pseudonym) information when forwarding HTTP messages from clients to upstreams. Currently, Kong just ignores this part.
And optionally append the information when forwarding messages in the reverse direction, depending on the
headers
configuration. Currently, Kong blindly overrides the responseVia
header with server token.This PR do the following works:
1.1 kong/3.8.0
, and outbound info like1.1 kong/3.8.0
.2 kong/3.8.0
and outbound2 kong/3.8.0
.Server
header, it inserts one likekong/3.8.0
.Via
assignment ofaws-lamdba
andazure-function
plugins.This is scheduled for
3.8.0
.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix #FTI-5807