Skip to content

Add `/-/external_redirect` endpoint

Paul Slaughter requested to merge ps-redirect-controller into master

What does this MR do and why?

This MR adds a /-/external_redirect endpoint to handle situations where we want to show the user the URL they are about to visit when leaving GitLab.

Screenshots or screen recordings

Screenshot

Screenshot_2023-11-07_at_1.46.31_PM

Screenshot (sm display)

Screenshot_2023-11-07_at_1.46.40_PM

Demo with Mastodon link

2023_11_07_demo

How to set up and validate locally

To just generally test the endpoint:

  1. Start GDK
  2. Visit /-/external_redirect?url=https%3A%2F%2Fgoogle.com

To test the endpoint with user's mastodon social:

  1. Enable mastodon_social_ui feature flag Feature.enable(:mastodon_social_ui)
  2. Sign in to GDK as root
  3. Visit /-/profile and set Mastodon: to @root@mastodon.social. Click Update profile settings.
  4. Visit user's page /root and click Mastodon icon.

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

Thanks

Thanks @leetickett-gitlab @a_luna @jannik_lehmann && @cwoolley-gitlab for pairing on this with me 👍

Edited by Paul Slaughter

Merge request reports