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

Update X-Forwarded-Port #86

Closed
wants to merge 2 commits into from
Closed

Update X-Forwarded-Port #86

wants to merge 2 commits into from

Conversation

alexw23
Copy link

@alexw23 alexw23 commented Dec 22, 2016

It appears this package is assuming the port running on the Ingress Controller as the port.

In the current situation, if my LB sends X-Forwarded-Port: 443 and the ingress controller is running on port 80. X-Forwarded-Port: 80 will end up in my app.

Now it's correctly routing.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 22, 2016
@k8s-reviewable
Copy link

This change is Reviewable

@@ -197,7 +202,7 @@ http {
{{ end }}

# map port 442 to 443 for header X-Forwarded-Port
map $pass_port $server_port {
map $pass_port $pass_server_port {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about this 442 to 443 entry so I left it as is.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 39.868% when pulling 8b8b02e on alexw23:x-forwarded-port into 3980756 on kubernetes:master.

@@ -107,6 +107,11 @@ http {
default $http_x_forwarded_proto;
'' $scheme;
}

map $http_x_forwarded_proto $pass_server_port {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean http_x_forwarded_port right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sorry - I edited it on the fly.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 39.868% when pulling 3bb38c7 on alexw23:x-forwarded-port into 3980756 on kubernetes:master.

@aledbf
Copy link
Member

aledbf commented Dec 26, 2016

fixed by #91

@aledbf aledbf closed this Dec 26, 2016
hnrytrn pushed a commit to hnrytrn/ingress-nginx that referenced this pull request Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants