Skip to content
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

Add protocol header for upstream service #973

Closed
chnliyong opened this issue Dec 15, 2019 · 7 comments
Closed

Add protocol header for upstream service #973

chnliyong opened this issue Dec 15, 2019 · 7 comments

Comments

@chnliyong
Copy link
Contributor

chnliyong commented Dec 15, 2019

The upstream service such as web rendering may sometimes need to know the incoming request's scheme(http or https) from client.
Conventionally use the http header X-Forwarded-ProtoX-Forwarded-Proto

@moonming
Copy link
Member

I think you can use the proxy-rewrite plugin.

@chnliyong
Copy link
Contributor Author

I think you can use the proxy-rewrite plugin.

I thought this is a very commonly requirement if apisix is used as a reverse proxy to offer ssl offloading, and configure the proxy-rewrite for all routes is tedious.
We may add a option such as enable_protocol_forwarded and protocol_forwarded_header in config.yaml if we don't want this as default. Actually, I would like this be default.

      proxy_set_header ....
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header ....

@moonming
Copy link
Member

I got your point.
I think we can add this to /bin/apisix directly.

@moonming
Copy link
Member

you can send email to mailing list to discuss with more developer.

@moonming
Copy link
Member

@chnliyong any update?

@agile6v
Copy link
Member

agile6v commented Feb 3, 2020

@chnliyong
Hi, will you continue to follow up on this issue?

@agile6v
Copy link
Member

agile6v commented Feb 12, 2020

This issue has been fixed by #1113 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants