Skip to content

Allow dots in Pages' path_prefix

Alisa Frunza requested to merge 507423-allow-dots-in-pages-path_prefix into master

What does this MR do and why?

This merge request enables the use of dots in the path_prefix in Pages URLs for Parallel Deployments. This is particularly useful for reflecting versioning conventions and allowing having different versions of a site, for example:

  • site.com/v1.1/path
  • site.com/v1.2/path

Dots are not allowed at the beginning or end of the path, they are trimmed.

🗒️ Important to note that this functionality is only enabled for projects with an active license.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Create "Create from template" project at /projects/new
  2. Choose Pages/Plain HTML template
  3. After the project is created, edit in pipeline editor the .gitlab-ci.yml file and add there the following path prefix:
pages:
  stage: deploy
  pages:
    path_prefix: "v1.1"
  1. Commit the change
  2. After that navigate to Deploy > Pages, there should be a Parallel deployments section where you can find the path you specified, it should be similar to https://test-project-22e7ca.gitlab.io/v1.1. It's important to check whether v1.1 was not replaced with v1-1.

Related to #507423 (closed)

Edited by Alisa Frunza

Merge request reports

Loading