Fix: include relative URL root in PDF worker and cMap paths
What does this MR do and why?
Ensures PDF.js worker and character map files are loaded correctly when GitLab is installed with a relative URL root.
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- add a
relative_url_roottogdk.yml(https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/configuration.md#notable-settings) - visit your gdk at the updated root. for example:
-
before this change, my gdk runs at
https://gdk.test:3443. -
i added
relative_url_root: /chao -
after
gdk reconfigure, my gdk runs athttps://gdk.test:3443/chao -
note, because of #547602 (comment 2609427520), routing will break so you will need to add your relative url to the url manually
🌚
-
- open a pdf (e.g. my fav https://wildwelfare.org/wp-content/uploads/Care-for-us-Capybara-1.pdf)
- file should load with no errors
MR acceptance checklist
1Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #381693 (closed)
Edited by Chaoyue Zhao

