fix: wrong URL for GitLab registry http -> httpS redirect if port is empty
This fixes #3316 (closed). If configuration for GitLab registry does not set a port, @port
is empty and an invalid redirect URL is created. In that case it contains a colon (:
) between host and path. This breaks renewing Let's Encrypt certificates.
Wrong nginx configuration generated before if @port
is empty:
return 301 https://$http_host:$request_uri;
After this fix it correctly generates:
return 301 https://$http_host$request_uri;
There was a similar issue in GitLab CE: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20824
Checklist
See Definition of done.
-
Change added to CHANGELOG.md. Not applicable for Documentation changes and minor changes. -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA, if applicable -
MR targeting master
branch -
MR has a green pipeline on GitLab.com
Reviewer Checklist
In addition to above, reviewer must:
-
Pipeline is green on dev.gitlab.org if the change is not touching documentation or internal cookbooks
References
Edited by DJ Mountney