-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ISR when used in addition to middleware rewrite (#143)
* hash MessageDeduplicationId to avoid invalid values * Sync * added middleware rewrite with ISR * fix: make isr work with middleware rewrite * remove unecessary changes * add some usefull comments * Sync --------- Co-authored-by: Frank <[email protected]>
- Loading branch information
1 parent
22e8f70
commit d6db51f
Showing
8 changed files
with
1,986 additions
and
969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"open-next": patch | ||
--- | ||
|
||
revalidation: fix ISR revalidation for rewritten URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Layout from "../components/layout"; | ||
|
||
export async function getStaticProps() { | ||
return { | ||
props: { | ||
time: Date.now(), | ||
}, | ||
revalidate: 10, | ||
}; | ||
} | ||
|
||
export default function Page({ time }) { | ||
return ( | ||
<Layout> | ||
<article> | ||
<h1> | ||
Middleware — rewrite with Incremental Static Rendering (ISR) | ||
</h1> | ||
<hr /> | ||
<p> | ||
<b>Test 1:</b> | ||
This timestamp 👉 {time} should change every 10 seconds when the page is repeatedly refreshed. | ||
</p> | ||
</article> | ||
</Layout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Layout from "../components/layout"; | ||
|
||
export default function Page() { | ||
return ( | ||
<Layout> | ||
<article> | ||
<h1> | ||
Middleware — rewrite with Incremental Static Rendering (ISR) | ||
</h1> | ||
<hr /> | ||
<p> | ||
❌ If you see this page, Middleware with rewrite is NOT working. | ||
</p> | ||
</article> | ||
</Layout> | ||
); | ||
} |
Oops, something went wrong.
d6db51f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
open-next – ./
open-next-sst-dev.vercel.app
open-next-git-main-sst-dev.vercel.app
open-next.vercel.app