blob: 5036622febc1dd575814b4ab75861c96cef92c72 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { env } from '$env/dynamic/private';
export const GET = async ({ url }: { url: URL }) => {
return Response.json(
await (
await fetch(
`https://www.animecharactersdatabase.com/api_series_characters.php?month=${url.searchParams.get(
'month'
)}&day=${url.searchParams.get('day')}`,
{
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0',
'Cache-Control': 'max-age=10, s-maxage=10',
Cookie: `USTATS=${env.ACDB_COOKIE}`
}
}
)
).json(),
{
headers: {
'Cache-Control': 'max-age=10800, s-maxage=10800',
'Access-Control-Allow-Origin': 'https://due.moe'
}
}
);
};
|