GitLab Pages without DNS wildcard
Currently, creating a GitLab pages project would require a domain of the form
name.pages.example.io. This setup forces admins to setup wildcard DNS records and SSL/TLS certificates (i.e.
*.pages.example.io). Some services typically used by small structures or individuals (such as Let's Encrypt) disallow this.
Removing the requirement for wildcard certificates would allow using services like Let's Encrypt on the main GitLab pages domain, without the need to setup a custom domain. It would also allow for easy configuration of custom HTTP(S) proxies like Apache. Finally, IMHO having an exponential amount of off-the-radar subdomains is really bad when you try to keep your DNS space clean and tidy.
In order to remove the need for wildcard dns, the namespace can be included in the URL path instead of the domain.
https://name.pages.example.io/index.html would become
This could be done by setting a specific variable in
gitlab_pages["namespace_in_path"] = true;
This variable would then change the URL parsing rule used by GitLab pages so that it will look for the namespace in the URL path instead of the subdomain.
In order to ensure compatibility with existing setups, this feature would obviously be turned off by default.
Links / references
This setup might have security or technical issues I do not know of. I have not been able to find the reasons behind the choice to include namespaces as subdomains, and I would be interested to know about them.