From fcb27be56b8a3426f7c2d470b1e813f2510b77c5 Mon Sep 17 00:00:00 2001 From: Lindsay Levine Date: Thu, 29 Oct 2020 07:32:43 -0400 Subject: [PATCH] remove the temporary splat workaround now that internal fix is released --- lib/steps/setupRedirects.js | 4 ---- tests/__snapshots__/defaults.test.js.snap | 3 +-- tests/__snapshots__/optionalCatchAll.test.js.snap | 3 +-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/steps/setupRedirects.js b/lib/steps/setupRedirects.js index ed65c03..e382a52 100644 --- a/lib/steps/setupRedirects.js +++ b/lib/steps/setupRedirects.js @@ -73,10 +73,6 @@ const setupRedirects = () => { redirects.splice(rootCatchAllIndex, 0, "/_next/* /_next/:splat 200"); } - // Add workaround for pre-traffic mesh cookie-based redirects - // TO-DO: remove when internal netlify bug is resolved - if (nextRedirects.length >= 1) redirects.push("/* /:splat 200"); - // Write redirects to _redirects file writeFileSync(join(NETLIFY_PUBLISH_PATH, "_redirects"), redirects.join("\n")); }; diff --git a/tests/__snapshots__/defaults.test.js.snap b/tests/__snapshots__/defaults.test.js.snap index 57a769f..a2e87cd 100644 --- a/tests/__snapshots__/defaults.test.js.snap +++ b/tests/__snapshots__/defaults.test.js.snap @@ -42,6 +42,5 @@ exports[`Routing creates Netlify redirects 1`] = ` /getStaticProps/withRevalidate/withFallback/:id /.netlify/functions/next_getStaticProps_withRevalidate_withFallback_id 200 /shows/:id /.netlify/functions/next_shows_id 200 /shows/:params/* /.netlify/functions/next_shows_params 200 -/static/:id /static/[id].html 200 -/* /:splat 200" +/static/:id /static/[id].html 200" `; diff --git a/tests/__snapshots__/optionalCatchAll.test.js.snap b/tests/__snapshots__/optionalCatchAll.test.js.snap index ae6c800..5b991a2 100644 --- a/tests/__snapshots__/optionalCatchAll.test.js.snap +++ b/tests/__snapshots__/optionalCatchAll.test.js.snap @@ -8,6 +8,5 @@ exports[`Routing creates Netlify redirects 1`] = ` /page /.netlify/functions/next_page 200 / /.netlify/functions/next_all 200 /_next/* /_next/:splat 200 -/* /.netlify/functions/next_all 200 -/* /:splat 200" +/* /.netlify/functions/next_all 200" `;