diff options
| -rw-r--r-- | index.ts | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -99,15 +99,14 @@ const handleRequest = async (originalRequest) => { // ); // } - response.headers.set( - "cache-control", - "public, immutable, s-maxage=31536000, max-age=31536000, stale-while-revalidate=60" - ); - response.headers.set("Access-Control-Allow-Origin", "https://due.moe"); - return new Response(response.body, { status: response.status, statusText: response.statusText, - headers: response.headers, + headers: { + "Cache-Control": + "public, immutable, s-maxage=31536000, max-age=31536000, stale-while-revalidate=60", + "Access-Control-Allow-Origin": "https://due.moe", + ...response.headers, + }, }); }; |