1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-14 12:27:29 +00:00

Set Access-Control-Allow-Origin * on feeds

This enables client-side only web readers like Airss to work.
This commit is contained in:
Cadence Ember 2021-12-06 18:20:15 +13:00
parent 91022aa5da
commit 3700b3a9ac
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17

View File

@ -23,6 +23,7 @@ function respondWithFeed(feed, kind, maxAge, available) {
}
}
const headers = {
"Access-Control-Allow-Origin": "*",
"Cache-Control": `public, max-age=${maxAge}`
}
if (!available) headers["X-Bibliogram-Feed-Unavailable"] = 1