Просмотр исходного кода

fix(insights): Add redirects for Insights sub-routes (#73736)

https://github.com/getsentry/sentry/pull/72881 added "proper" redirects
for all Insights module from `/performance/` to `/insights/` URLs, but
it missed sub-routes! URLs like
`/performance/http/domains/?domain=sentry.io` weren't getting
redirected.

The wildcard and `:splat` match creates redirects for all sub-routes.
George Gritsouk 8 месяцев назад
Родитель
Сommit
3ea6d9f29a
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      static/app/routes.tsx

+ 2 - 2
static/app/routes.tsx

@@ -1468,8 +1468,8 @@ function buildRoutes() {
         moduleBaseURL && (
           <Redirect
             key={moduleBaseURL}
-            from={`${moduleBaseURL}`}
-            to={`/${INSIGHTS_BASE_URL}/${moduleBaseURL}/`}
+            from={`${moduleBaseURL}/*`}
+            to={`/${INSIGHTS_BASE_URL}/${moduleBaseURL}/:splat`}
           />
         )
     )