Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic redirect support #560

Merged
merged 4 commits into from
Feb 3, 2025
Merged

Add basic redirect support #560

merged 4 commits into from
Feb 3, 2025

Conversation

stianst
Copy link
Contributor

@stianst stianst commented Jan 30, 2025

Related to #559

Signed-off-by: stianst stianst@gmail.com

Signed-off-by: stianst <stianst@gmail.com>
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
@ahus1
Copy link
Contributor

ahus1 commented Jan 30, 2025

The concept looks good to me. I might consider inlining resources/redirects into the HTML using freemarker logic to avoid another remote request.

If we have a match, I updated the page title so that Google Analytics will record something different than the page title "page not found", as we use that in our report. See stianst#1 for a PR. Inlining would still make sure that this update doesn't happen too late.

Instead of startWith() I would instead prefer a RegEx as we would soon use wildcards for version placeholders (redirecting to the latest version if a earlier patch release was removed), or having a wildcard for with and without .html.
If you think this could be handled in a follow-up PR, feel free to merge this one.

@stianst stianst marked this pull request as ready for review February 3, 2025 14:21
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
@ahus1 ahus1 merged commit 8705691 into keycloak:main Feb 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants