aboutsummaryrefslogtreecommitdiff
path: root/src/routes/api/mangadex/feed
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-10 02:52:42 -0800
committerFuwn <[email protected]>2023-12-10 02:52:42 -0800
commit5ce87ef1ae379db84e7ee0b32e2a5024b7915d81 (patch)
treed35340921d5683260053876016d934f42bfc2234 /src/routes/api/mangadex/feed
parentfeat(manga): lighter rate-limits (diff)
downloaddue.moe-5ce87ef1ae379db84e7ee0b32e2a5024b7915d81.tar.xz
due.moe-5ce87ef1ae379db84e7ee0b32e2a5024b7915d81.zip
feat(api): safe response rate-limits
Diffstat (limited to 'src/routes/api/mangadex/feed')
-rw-r--r--src/routes/api/mangadex/feed/+server.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/routes/api/mangadex/feed/+server.ts b/src/routes/api/mangadex/feed/+server.ts
index ab28ba2b..ebfdd094 100644
--- a/src/routes/api/mangadex/feed/+server.ts
+++ b/src/routes/api/mangadex/feed/+server.ts
@@ -7,7 +7,12 @@ export const GET = async ({ url }) => {
'id'
)}/feed?order[chapter]=desc&translatedLanguage[]=en&limit=1&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic`
)
- ).json()
+ ).json(),
+ {
+ headers: {
+ 'Cache-Control': 'max-age=300'
+ }
+ }
);
} catch {
return new Response('rate-limited');