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

X-Forwarded-Port multiple value throw NumberFormatException #1821

Open
sweat123 opened this issue Sep 14, 2024 · 1 comment
Open

X-Forwarded-Port multiple value throw NumberFormatException #1821

sweat123 opened this issue Sep 14, 2024 · 1 comment
Labels

Comments

@sweat123
Copy link

In my environment, the request will be handle by two proxy. When the last zuul gateway receive the request, there are multiple value in header 'X-Forwarded-Port', likes thus:

X-Forwarded-Port: 9002,11000

The multiple port value case the exception in HttpRequestMessageImpl#getOriginalPort(SessionContext context, Headers headers, int serverPort).

image

Although XXF-Port should not have multiple values, but this problem may be more frequent and we should avoid it as much as possible. So I think zuul need get the most left value in 'X-Forwarded-Port' to avoid the Exception.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant