Redirect from HTTP to HTTPS doesn't work for default domains
On GitLab.com, it looks like custom domains are now redirecting properly from HTTP to HTTPS, but default domains (e.g. tanukitalks.gitlab.io
) are not. This was reported in https://gitlab.com/gitlab-org/gitlab-ce/issues/46561#note_96823721 and https://gitlab.com/gitlab-com/production/issues/358#note_93992855.
I looked into this a bit. It looks to me that for some reason the domain config passed along to IsHTTPSOnly
is nil
here: https://gitlab.com/gitlab-org/gitlab-pages/blob/6e48bceb83147ef3093ba8c4d656af90cb4f4a37/internal/domain/domain.go#L103. The block after that shouldn't run for default domains since the path doesn't contain the project/group information.