mirror of
https://github.com/skidoodle/erettsegi-browser.git
synced 2025-02-15 05:39:15 +01:00
xd
This commit is contained in:
parent
50df2a4739
commit
b2e968efaf
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,11 @@ export default async function handler(
|
||||||
return res.status(400).json({ error: `Hiányzó paraméter: ${missingParam}` })
|
return res.status(400).json({ error: `Hiányzó paraméter: ${missingParam}` })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const domain = link.split('/')[2]
|
||||||
|
if (domain !== 'erettsegi.albert.lol') {
|
||||||
|
return res.status(400).json({ error: 'Érvénytelen link' })
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
res.setHeader('Cache-Control', 's-maxage=31536000')
|
res.setHeader('Cache-Control', 's-maxage=31536000')
|
||||||
const { protocol, host } = new URL(link)
|
const { protocol, host } = new URL(link)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue