Skip to content

Fix API and IDE path with `/` relative_url_root

Paul Slaughter requested to merge fix-api-ide-relative-url-root into master

What does this MR do?

This MR fixes a FE bug which was particularly noticeable when running the latest GDK version. Throughout the FE code, we simply prefix gon.relative_url_root to our paths. This causes issues when relative_url_root is /, causing URLs to be //api/v4/project?, which create requests to http://api/v4/... 😞.

The BE supports a relative_url_root of / and it's a bug that the FE does not.

Why not just configure your local relative_url_root to not be /?

Please see relevant Slack discussion for my experience with this issue. I could not understand why this was being set to /, but it's probably a mix of some caching rule and what it defaults to in gdk/run.

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Edited by Paul Slaughter

Merge request reports