Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

remove the temporary splat workaround now that internal fix is released #67

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions lib/steps/setupRedirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
};
Expand Down
3 changes: 1 addition & 2 deletions tests/__snapshots__/defaults.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
`;
3 changes: 1 addition & 2 deletions tests/__snapshots__/optionalCatchAll.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
`;