Skip to content

Commit 0bba9cf

Browse files
committed
🐛 Fix invalid image content type.
1 parent e799ada commit 0bba9cf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/handler.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export async function processEtagHeader(
168168
): Promise<Response> {
169169
const etag = await etagPromise;
170170
if (etag) {
171-
response.headers.append('ETag', etag);
171+
response.headers.set('ETag', etag);
172172
}
173173
return response;
174174
}
@@ -181,13 +181,13 @@ export function processHeaders(
181181
const now = new Date();
182182
const expires = new Date(now.getTime() + cacheTTL);
183183

184-
response.headers.append('Content-Type', 'image/svg+xml');
185-
response.headers.append('Cache-Control', `public, max-age=${maxage}`);
186-
response.headers.append('Last-Modified', now.toUTCString());
187-
response.headers.append('Expires', expires.toUTCString());
184+
response.headers.set('Content-Type', 'image/svg+xml');
185+
response.headers.set('Cache-Control', `public, max-age=${maxage}`);
186+
response.headers.set('Last-Modified', now.toUTCString());
187+
response.headers.set('Expires', expires.toUTCString());
188188

189189
if (cors) {
190-
response.headers.append('Access-Control-Allow-Origin', '*');
190+
response.headers.set('Access-Control-Allow-Origin', '*');
191191
}
192192

193193
return response;

0 commit comments

Comments
 (0)