Skip to content

Commit 3362cfa

Browse files
authored
chore: enable dynamic compression on the docs-app
1 parent cc27b8a commit 3362cfa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs-app/src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ async function app(event) {
1111
console.log(`FASTLY_SERVICE_VERSION: ${env('FASTLY_SERVICE_VERSION')}`)
1212
const response = await get('site', event.request)
1313
if (response) {
14+
// Enable Dynamic Compression -- https://developer.fastly.com/learning/concepts/compression/#dynamic-compression
15+
response.headers.set("x-compress-hint", "on");
1416
return response
1517
} else {
1618
return new Response("Not Found", { status: 404 });
@@ -19,4 +21,4 @@ async function app(event) {
1921
console.error(error);
2022
return new Response(error.message + '\n' + error.stack, { status: 500 })
2123
}
22-
}
24+
}

0 commit comments

Comments
 (0)