Skip to content

Commit

Permalink
fix: rollback the PageRule cache level change (#95)
Browse files Browse the repository at this point in the history
* fix: rollback the PageRule cache level change

* feat: add the pageRuleConfig as output to debug
  • Loading branch information
juanmahidalgo authored Jul 7, 2022
1 parent 6e6f530 commit 2de58a2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .ci/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,24 @@ export = async function main() {
)

const publicUrl = nftAPI.endpoint

new cloudflare.PageRule('trendings-cache', {
const pageRuleConfig = {
target: `${baseHostname}${getCloudflareDomain(
env
)}/${API_VERSION}/trendings`,
zoneId: getZoneId(),
actions: {
alwaysOnline: 'on',
cacheLevel: 'cacheEverything',
cacheLevel: 'cache_everything',
cacheTtlByStatuses: [{ codes: '200', ttl: 31536000 /* a year */ }],
edgeCacheTtl: 31536000 /* a year */,
browserCacheTtl: '31536000' /* a year */,
},
})
}

new cloudflare.PageRule('trendings-cache', pageRuleConfig)

return {
publicUrl,
pageRuleConfig,
}
}

0 comments on commit 2de58a2

Please sign in to comment.