Cache-control
This commit is contained in:
@ -21,6 +21,8 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
const contentHtml = await generateContent(contentEntry) as string;
|
||||
const contentPrepared = prepareDOM(contentHtml);
|
||||
|
||||
context.res.setHeader("Cache-Control", "public, s-maxage=3600, stale-while-revalidate=600");
|
||||
|
||||
return {
|
||||
props: {
|
||||
content: {
|
||||
|
@ -21,6 +21,8 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
const contentHtml = await generateContent(contentEntry, Number.parseInt(page)) as string;
|
||||
const contentPrepared = prepareDOM(contentHtml);
|
||||
|
||||
context.res.setHeader("Cache-Control", "public, s-maxage=3600, stale-while-revalidate=600");
|
||||
|
||||
return {
|
||||
props: {
|
||||
content: {
|
||||
|
@ -22,6 +22,8 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
const contentHtml = await generateContent(contentEntry) as string;
|
||||
const contentPrepared = prepareDOM(contentHtml);
|
||||
|
||||
context.res.setHeader("Cache-Control", "public, s-maxage=3600, stale-while-revalidate=600");
|
||||
|
||||
return {
|
||||
props: {
|
||||
content: {
|
||||
|
Reference in New Issue
Block a user