blob: 68e125bd732466934009d7f9601ca55d5f44e005 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
export const GET = async ({ url }) => {
try {
return Response.json(
await (
await fetch(
`https://api.mangadex.org/chapter?manga=${url.searchParams.get(
'id'
)}&chapter=${url.searchParams.get(
'chapter'
)}&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&limit=1`
)
).json(),
{
headers: {
'Cache-Control': 'max-age=300'
}
}
);
} catch {
return new Response('rate-limited');
}
};
|