-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing cache-control on SSR app route (#70265)
This removes an inaccurate check that doesn't set a revalidate value if revalidate is `undefined` which can be the case for SSR app route pages. Also adds a regression test to ensure this doesn't break again. Fixes: #70213
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 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
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,16 @@ | ||
import { useRouter } from 'next/router' | ||
|
||
export default function Page(props) { | ||
return ( | ||
<> | ||
<p>hello from ssr</p> | ||
<p id="query">{JSON.stringify(useRouter().query)}</p> | ||
</> | ||
) | ||
} | ||
|
||
export function getServerSideProps() { | ||
return { | ||
props: {}, | ||
} | ||
} |