diff --git a/src/pages/api/erettsegi.ts b/src/pages/api/erettsegi.ts index 999537d..114f9f7 100644 --- a/src/pages/api/erettsegi.ts +++ b/src/pages/api/erettsegi.ts @@ -85,5 +85,6 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) { break } + res.setHeader('Cache-Control', 's-maxage=31536000') res.status(200).json({ flPdfUrl, utPdfUrl, flZipUrl, utZipUrl }) } diff --git a/src/pages/api/proxy.ts b/src/pages/api/proxy.ts index c4ce2c2..d75e6c7 100644 --- a/src/pages/api/proxy.ts +++ b/src/pages/api/proxy.ts @@ -20,6 +20,7 @@ export default async function handler( } try { + res.setHeader('Cache-Control', 's-maxage=31536000') const response = await fetch(link, { method: 'GET' }) const contentType = response.headers.get('content-type') if (contentType == 'application/pdf') { diff --git a/src/pages/api/validate.ts b/src/pages/api/validate.ts index 9c15f42..0b7faec 100644 --- a/src/pages/api/validate.ts +++ b/src/pages/api/validate.ts @@ -15,6 +15,7 @@ export default async function handler( } try { + res.setHeader('Cache-Control', 's-maxage=31536000') const { protocol, host } = new URL(link) if (protocol && host) { const response = await fetch(link, { method: 'HEAD' })