Proxy asset URLs with protocol but no slashes
What does this MR do and why?
URLs with a protocol but no slashes (http:example.com
) aren't proxied but somehow the browser works well with those so they should have been proxied. This MR fixes that.
A second commit refactors the tests to remove the copy pasting.
Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/381748
Screenshots or screen recordings
No visual changes
How to set up and validate locally
- Configure the asset proxy https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/asset_proxy.md
- Post
<img src=http:www.iana.org/_img/2022/iana-logo-header.svg>
in an issue (or MR, or comment, or...) - Inspect the element and ensure the image source is going through the asset proxy
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Dominic Couture