increase edge cache TTL (we're purging cache on deploys anyway)

This commit is contained in:
2020-06-03 16:41:47 -04:00
parent a0c59dcdc3
commit 446a4b85ef
2 changed files with 5 additions and 2 deletions

View File

@ -33,6 +33,8 @@ if (window.WebSocket) {
var rfb = new RFB({ target: display, encrypt: true });
rfb.connect("sandbox.y2k.lol", 443);
}
</script>
<script>
var random_tile = Math.floor(Math.random() * 20);
document.body.style.backgroundImage = 'url("tiles/tile_' + random_tile + '.png")';
</script>

View File

@ -28,10 +28,11 @@ async function handleEvent(event) {
let options = {
cacheControl: {
browserTTL: 3600,
edgeTTL: 604800,
}
}
let headers = {
const headers = {
'X-XSS-Protection': '1; mode=block',
'X-Frame-Options': 'DENY',
'X-Content-Type-Options': 'nosniff',
@ -63,6 +64,6 @@ async function handleEvent(event) {
} catch (e) {}
}
return new Response(e.message || e.toString(), { headers, status: 500 })
return new Response(e.message || e.toString(), { status: 500 })
}
}