Skip to content

Commit

Permalink
Fix pagination links returned in non-TLS deployments
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
stuggi committed Oct 14, 2024
1 parent 05b0bad commit 397320c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/swiftproxy/config/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ CustomLog /dev/stdout proxy env=forwarded

## Request header rules
## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
{{- if $vhost.TLS }}
RequestHeader set X-Forwarded-Proto "https"
{{- else }}
RequestHeader set X-Forwarded-Proto "http"
{{- end }}

LimitRequestBody 5368709122
LimitRequestFields 200
Expand Down

0 comments on commit 397320c

Please sign in to comment.