Skip to content

Commit 6561437

Browse files
committed
use post to bypass cache
1 parent c02216a commit 6561437

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

router/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ async function cachedFetchServerSideProps(pathname: string) {
2727
return cache.get(pathname);
2828
}
2929
const response = await fetch(pathname, {
30+
method: "POST",
3031
headers: {
3132
Accept: "application/vnd.server-side-props",
33+
"Cache-Control": "no-cache",
3234
},
3335
});
3436
if (response.ok) {

0 commit comments

Comments
 (0)