Skip to content

fix: correct redirect priority and correctly handle ISR pages assets #826

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 12 commits into from
Nov 23, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Nov 22, 2021

Summary

Corrects the ordering of rewrites, and adds one to ensure api routes aren't served by ODBs. Also ensures that pre-rendered ISR pages aren't served from the CDN, as they need to be handled by the function.

Test plan

  1. Visit the the deploy preview api route and ensure that the query is echoed back
  2. Visit a revalidate page and check in the network panel that the header x-render-mode is ssr and the date header is now. (Don't expect the render time in the page to update)

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

Fixes #765

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Nov 22, 2021
@ascorbic ascorbic force-pushed the mk/redirect-sorting branch from c7bf60a to 8361468 Compare November 22, 2021 14:14
@ascorbic ascorbic force-pushed the mk/redirect-sorting branch from 8bf0400 to 739e513 Compare November 22, 2021 15:51
@ascorbic ascorbic force-pushed the mk/redirect-sorting branch from 39f383d to 287cb1f Compare November 22, 2021 17:43
@ascorbic ascorbic changed the title fix: wip redirect ordering fix: correct redirect priority and correctly handle ISR pages assets Nov 23, 2021
@ascorbic ascorbic self-assigned this Nov 23, 2021
@ascorbic ascorbic force-pushed the mk/redirect-sorting branch from 5f428f3 to 0521168 Compare November 23, 2021 09:33
@ascorbic ascorbic marked this pull request as ready for review November 23, 2021 09:37
@ascorbic ascorbic force-pushed the mk/redirect-sorting branch from 39ebdf5 to 02d0834 Compare November 23, 2021 09:44
@@ -4,29 +4,18 @@ const Header = dynamic(() => import(/* webpackChunkName: 'header' */ '../compone
import { useRouter } from 'next/router'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are just some updates to the demo index page, as it used deprecated syntax

Copy link
Contributor

@lukasholzer lukasholzer 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 6b61643 into main Nov 23, 2021
@kodiakhq kodiakhq bot deleted the mk/redirect-sorting branch November 23, 2021 10:09
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.

[Bug]: /api routes remove the query parameters on the req object
2 participants