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
1 changed files with 1 additions and 0 deletions

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