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

Fix X-Forwarded-Proto in non-TLS deployments #636

Closed
wants to merge 1 commit into from

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Oct 14, 2024

In the httpd container configuration there was an issue that "X-Forwarded-Proto" header was setting "https" protocol always, no matter if TLS was enabled in the deployment or not. It caused issues in neutron server with pagination when TLS was disabled as client was doing request to the "http://" endoint and got in response "https://" links to "next" and "prev" pages.

This patch fixes this issue by setting correct protocol for both cases: TLS and non-TLS.

Related: OSPRH-10632

Server returns links to the "next" and "previous" page of
results when pagination is requested by client.
In the httpd container configuration there was an issue that
"X-Forwarded-Proto" header was setting "https" protocol always, no
matter if TLS was enabled in the deployment or not. It caused issues
when TLS was disabled as client was doing request to the "http://"
endoint and got in response "https://" links to "next" and "prev" pages.

This patch fixes this issue by setting correct protocol for both cases:
TLS and non-TLS.

Related: OSPRH-10632

Signed-off-by: Martin Schuppert <[email protected]>
@stuggi
Copy link
Contributor Author

stuggi commented Oct 14, 2024

@stuggi stuggi changed the title Fix pagination links returned in non-TLS deployments Fix X-Forwarded-Proto in non-TLS deployments Oct 14, 2024
Copy link
Contributor

@fmount fmount left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Oct 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fmount
Copy link
Contributor

fmount commented Oct 14, 2024

makes sense, thank you @stuggi

@stuggi
Copy link
Contributor Author

stuggi commented Oct 14, 2024

From discussion with @olliewalsh and @slawqo this should probably removed here because if, it should be set where the client terminates

@stuggi stuggi closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants