Allow use of other index extensions (htm, xhtml, etc)
<!-- This template is a great use for issues that are feature::additions or technical tasks for larger issues.--> <!-- Use this section to explain the feature and how it will work. It can be helpful to add technical details, design proposals, and links to related epics or issues. --> ### Context: We must use `index.html` filename in the public directory to display GitLab Pages. As the [documentation](https://docs.gitlab.com/ee/user/project/pages/introduction.html#404-error-when-accessing-a-gitlab-pages-site-url) states: ``` 404 error when accessing a GitLab Pages site URL This problem most likely results from a missing index.html file in the public directory. If after deploying a Pages site a 404 is encountered, confirm that the public directory contains an index.html file. If the file contains a different name such as test.html, the Pages site can still be accessed, but the full path would be needed. For example: https//group-name.pages.example.com/project-name/test.html. ``` This means if we use as a filename `index.htm`, this will return a 404 error and you need to use the full path to access your pages `https//group-name.pages.example.com/project-name/index.htm`. ### Proposal Also look for an `index.htm` in the public directory, so we can use `index.htm` or `index.html` to display our GitLab Pages. ### Implementation guide * When we read the zip archive, [we make a list of directories/files in that archive](https://gitlab.com/gitlab-org/gitlab-pages/-/blob/master/internal/vfs/zip/archive.go#L163) * At this point, we should check what is the extension of `index` file. Save that extension in a [field(](https://gitlab.com/gitlab-org/gitlab-pages/-/blob/master/internal/vfs/zip/archive.go#L48)`fileExtension`) for that archive which will default to `html`. * **Optional** : We can add a check here to see if it's from an allowed list of extension(and can then parameterize that flag as well in future) * Instead of hardcoding the extension in places like [these](https://gitlab.com/gitlab-org/gitlab-pages/-/blob/master/internal/serving/disk/reader.go#L88), use the saved extension from the above step. List of allowed extensions: - html - xhtml - htm - xhtm <!-- Consider adding related issues and epics to this issue. You can also reference the Feature Proposal Template (https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Feature%20proposal%20-%20detailed.md) for additional details to consider adding to this issue. Additionally, as a data oriented organization, when your feature exits planning breakdown, consider adding the `What does success look like, and how can we measure that?` section. --> <!-- Label reminders Use the following resources to find the appropriate labels: - https://gitlab.com/gitlab-org/gitlab/-/labels - https://about.gitlab.com/handbook/product/categories/features/ -->
issue