Allow per-site custom configuration of GitLab Pages using a file in the repo
Problem to Solve
We have a number of open issues that all make requests with an attribute in common:
- #22 - HTTP Basic auth support
- #23 (closed) - route all requests to index.html, including support of SPA
- #24 (closed) - a custom list of redirects
- #28 (closed) - Add HSTS headers
- #50 - General-purpose extra headers mechanism, particularly covering caching headers
- #66 (closed) - CORS configuration (global-only at present)
- #80 - Prevent direct access to namespace.gitlab.io
- #89 - custom MIME types per-project
- https://gitlab.com/gitlab-org/gitlab-ce/issues/42949 - canonical redirect
- https://gitlab.com/gitlab-org/gitlab-ce/issues/35141 - persist site content between runs
These all want to have custom HTTP server configurations for their sites.
Proposal
Rather than picking piecemeal solutions, it would be nice to consider a single solution that could support all these use cases in a standard, unified way: through a .gitlab-pages.yml
containing the appropriate configuration.
We should choose one or two initial configurations (perhaps #23 (closed), #28 (closed), https://gitlab.com/gitlab-org/gitlab-ce/issues/42949) to prove out the feature, and then we can schedule the rest.
Limitations
At least initially, the MVC will support reading configuration only for sites using custom domains. There are domain-level configurations that could conflict between projects using the same domain.
/cc @ayufan
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.