Skip to content

fix: use forced catchall for preview mode #793

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

Merged
merged 4 commits into from
Nov 15, 2021
Merged

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Nov 12, 2021

Summary

For preview mode, instead of generating a forced redirect for every pre-rendered page, instead make the catch-all a forced redirect. This prevents the need to generate very large numbers of redirects.

Test plan

  1. In the demo site, load /previewTest. Check the message to see preview mode is disabled
  2. Go to /api/enterPreview
  3. Go back to /previewTest, and check that preview mode is enabled.
  4. Go to /api/exitPreview

Fixes #791

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 12, 2021
@ascorbic ascorbic force-pushed the mk/cookie-static-redirects branch from 4f73cb2 to 58019e6 Compare November 12, 2021 12:50
@ascorbic ascorbic force-pushed the mk/cookie-static-redirects branch from 58019e6 to 6bb4cfe Compare November 12, 2021 14:08
@ascorbic ascorbic requested a review from a team November 13, 2021 11:07
Copy link

@tiffafoo tiffafoo left a comment

Choose a reason for hiding this comment

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

LGTM

@kodiakhq kodiakhq bot merged commit fd7130f into main Nov 15, 2021
@kodiakhq kodiakhq bot deleted the mk/cookie-static-redirects branch November 15, 2021 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace individual rewrites for preview mode with a catch-all
2 participants