gitlab 16.0.1-ce - mermaid.js isn't rendered any more and leads to a syntax-error

Summary

Since upgrade on 16.0.1 GitLab CE in a self-hosted environment, installation in a subpath (https://git.domain.com/gitlab) doesn't render mermaid-graphs any more:

2023-05-31_082400

In the browser-console errors loading js-files are reported (403):

2023-05-31_082709

It looks like the /gitlab/-subpath is getting lost / is ignored.

Steps to reproduce

install gitlab-ce 16.0.1 in a subpath and create a readme.md file with content from the examples of the gitlab-documentation.

What is the current bug behavior?

mermaid-images won't be renderd when gitlab is installed in a subdirectory.

What is the expected correct behavior?

mermaid-images should also be renderd when gitlab is installed in a subdirectory.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

System information
System:         Debian 11
Proxy:          no
Current User:   git
Using RVM:      no
Ruby Version:   3.0.6p216
Gem Version:    3.4.13
Bundler Version:2.4.13
Rake Version:   13.0.6
Redis Version:  6.2.11
Sidekiq Version:6.5.7
Go Version:     unknown

GitLab information
Version:        16.0.1-ee
Revision:       29e1314f910
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     13.8
URL:            https://git.domain.com/gitlab
HTTP Clone URL: https://git.domain.com/gitlab/some-group/some-project.git
SSH Clone URL:  git@git.domain.com:some-group/some-project.git
Elasticsearch:  no
Geo:            no
Using LDAP:     yes
Using Omniauth: yes
Omniauth Providers: azure_activedirectory_v2

GitLab Shell
Version:        14.20.0
Repository storages:
- default:      unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell
Edited by Jason Plum