Skip to content

Fix Web IDE terminal button on relative URL root

What does this MR do and why?

This MR fixes #13833 (closed) where a URL being built on the FE neglected to check for gon.relative_url_root.

Screenshots or screen recordings

Description Before After
With relative_url_root: /gitlabbin Screen_Shot_2021-09-15_at_12.31.02_AM Screen_Shot_2021-09-15_at_12.12.34_AM
Without relative_url_root (should be no changes) Screen_Shot_2021-09-15_at_3.22.31_AM Screen_Shot_2021-09-15_at_3.21.47_AM

How to set up and validate locally

  1. Add relative_url_root: /gitlabbin to your gdk.yml
  2. Run gdk reconfigure
  3. Start gdk with gdk start
  4. Visit your gdk in the browser with the relative url root (example, https://gitlab.test:3443/gitlabbin)
  5. Visit a project and click "Web IDE"
  6. You should see the "Web Terminal" icon in the right sidebar and the request to ide_terminals/check_config will either be 200 or 422 (this is an expected error code).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

References

Related to #13833 (closed)

Edited by Paul Slaughter

Merge request reports