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

request help: proxy-rewrite cannot modify X-Forwarded-Port #6945

Closed
Horus-K opened this issue Apr 27, 2022 · 2 comments
Closed

request help: proxy-rewrite cannot modify X-Forwarded-Port #6945

Horus-K opened this issue Apr 27, 2022 · 2 comments

Comments

@Horus-K
Copy link

Horus-K commented Apr 27, 2022

Current Behavior

clb(80 port)-> apisix(9080 port) --> pod
image
image

Expected Behavior

X-Forwarded-Port: 777
X-Forwarded-Port111: 77788

Error Logs

No response

Steps to Reproduce

apiVersion: apisix.apache.org/v2beta3
kind: ApisixRoute
metadata:
name: whoami
namespace: apisix
spec:
http:

  • backends:
    • resolveGranularity: service
      serviceName: whoami
      servicePort: 80
      weight: 100
      match:
      paths:
      • /*
        plugins:
    • name: proxy-rewrite
      enable: true
      config:
      headers:
      X-Forwarded-Port: 777
      X-Forwarded-Port111: 77788
      name: rule11

Environment

  • APISIX version (run apisix version): 1.13
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
@Horus-K
Copy link
Author

Horus-K commented Apr 27, 2022

This made me have to modify the apisix listening port to 80 443

@tzssangglass tzssangglass changed the title bug: proxy-rewrite cannot modify X-Forwarded-Port request help: proxy-rewrite cannot modify X-Forwarded-Port Apr 27, 2022
@tzssangglass
Copy link
Member

This is a known issue and not a bug.

You can continue working on this PR: #5367, or take a temporary solution like this: #5080 (comment)

@Horus-K Horus-K closed this as completed Apr 27, 2022
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

2 participants