Skip to content

Commit a7a8ce6

Browse files
committed
feat: add special content-type for .soy
1 parent 7d89302 commit a7a8ce6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@ export function createApp(siteId: string) {
429429
// Authenticated responses cannot be cached publicly.
430430
proxyRes.headers['cache-control'] = 'private, max-age=0';
431431
}
432+
// Special case for generated `.soy` and `.soy.html` files.
433+
if (urlPath.endsWith('.soy') || urlPath.endsWith('.soy.html')) {
434+
proxyRes.headers['content-type'] = 'text/plain';
435+
}
432436

433437
// Handle custom headers.
434438
if (manifest.headers) {

0 commit comments

Comments
 (0)