Pagination link headers at API are redirecting to port 80 when SSL terminated at the load balancer
Summary
Customer has noticed an issue when using the API that navigating to the second page of returned results will return a link that specifies port 80, i.e. Link: <https://gitlab.example.com:80/api/v4/projects?membership=false&order_by=created_at&.....
.
This appears to be generated in the Pagination link header
Steps to reproduce
Configure Terminate SSL without backend SSL
Load paginated results from API request and view generated link for second page.
Example Project
This does not apply to GitLab.com (assuming because we terminate SSL at the backend).
What is the current bug behavior?
Link returns https://gitlab.example.com:80/api/v4.... which is trying to use https against port 80.
What is the expected correct behavior?
Link should be https://gitlab.example.com
Relevant logs and/or screenshots
Customer logs can be found at https://gitlab.zendesk.com/agent/tickets/114056 (Internal use only)
Output of checks
Results of GitLab environment info
Results of GitLab application Check
Possible fixes
The link is generated in pagination.rb.