Skip to content

Commit

Permalink
chore: resolve linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaswelinder committed Jun 30, 2021
1 parent de36a1e commit 2c2e083
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/adapter-cloudflare-workers/files/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ async function handle(event) {
// use the asset manifest to see if it exists
return await getAssetFromKV(event, {
cacheControl: {
// eslint-disable-next-line no-undef
browserTTL: STATIC_CACHE_TTL,
edgeTTL: EDGE_CACHE_TTL,
// eslint-disable-next-line no-undef
edgeTTL: EDGE_CACHE_TTL
}
});
} catch (e) {
Expand All @@ -49,7 +51,9 @@ async function handle(event) {
if (rendered) {
const { headers } = rendered;
// inject cache-control header
// eslint-disable-next-line no-undef
if (!!PAGE_CACHE_TTL && !(headers['Cache-Control'] || headers['cache-control'])) {
// eslint-disable-next-line no-undef
rendered.headers['cache-control'] = `max-age=${PAGE_CACHE_TTL}`;
}
return new Response(rendered.body, {
Expand Down

0 comments on commit 2c2e083

Please sign in to comment.