mirror of
https://github.com/skidoodle/erettsegi-browser.git
synced 2025-02-15 05:39:15 +01:00
dumb cache control test?!?!?!
This commit is contained in:
@@ -85,5 +85,6 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res.setHeader('Cache-Control', 's-maxage=31536000')
|
||||||
res.status(200).json({ flPdfUrl, utPdfUrl, flZipUrl, utZipUrl })
|
res.status(200).json({ flPdfUrl, utPdfUrl, flZipUrl, utZipUrl })
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ export default async function handler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
res.setHeader('Cache-Control', 's-maxage=31536000')
|
||||||
const response = await fetch(link, { method: 'GET' })
|
const response = await fetch(link, { method: 'GET' })
|
||||||
const contentType = response.headers.get('content-type')
|
const contentType = response.headers.get('content-type')
|
||||||
if (contentType == 'application/pdf') {
|
if (contentType == 'application/pdf') {
|
||||||
|
@@ -15,6 +15,7 @@ export default async function handler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
res.setHeader('Cache-Control', 's-maxage=31536000')
|
||||||
const { protocol, host } = new URL(link)
|
const { protocol, host } = new URL(link)
|
||||||
if (protocol && host) {
|
if (protocol && host) {
|
||||||
const response = await fetch(link, { method: 'HEAD' })
|
const response = await fetch(link, { method: 'HEAD' })
|
||||||
|
Reference in New Issue
Block a user