Skip to content

Conversation

@runningcode
Copy link
Contributor

@runningcode runningcode commented Jan 26, 2026

Fixes legacy preprod URL redirects to use clean URLs without the organization slug prefix.

Before: /preprod/launchpad-test-ios/10516//organizations/sentry/preprod/size/10516/?project=launchpad-test-ios
After: /preprod/launchpad-test-ios/10516//preprod/size/10516/?project=launchpad-test-ios

Legacy preprod URLs were redirecting to paths with /organizations/{slug}/
prefix, which is unnecessary on customer domains. Update redirect logic
to use clean URLs (/preprod/...) that work with the dual routing system.

This fixes redirects for:
- Size view: /preprod/:projectId/:artifactId/
- Install view: /preprod/:projectId/:artifactId/install/
- Compare view: /preprod/:projectId/compare/:headArtifactId/
- Compare with base: /preprod/:projectId/compare/:headArtifactId/:baseArtifactId/
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 26, 2026
Update the legacy preprod URL redirects to be conditional based on
whether the request is on a customer domain. On customer domains, use
clean URLs without organization slug. On non-customer domains, preserve
the organization slug for backward compatibility.

This ensures redirects work correctly across both domain types:
- Customer domains: /preprod/size/... (no org slug)
- Non-customer domains: /organizations/{slug}/preprod/size/... (with org slug)
@runningcode runningcode marked this pull request as ready for review January 26, 2026 15:39
@runningcode runningcode requested a review from a team as a code owner January 26, 2026 15:39
const isCompare = location.pathname.includes('/compare/');

const {customerDomain} = ConfigStore.getState();
const orgPrefix = customerDomain ? '' : `/organizations/${organization.slug}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this should work but I'm not sure how to test this customerDomain logic locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants