all repos — website @ da0355160e9603f097438c446ef1f9c992758ddb

My website

Send headers with 304 responses
Alan Pearce alan@alanpearce.eu
Wed, 13 Sep 2023 14:45:51 +0200
commit

da0355160e9603f097438c446ef1f9c992758ddb

parent

b52a1c8420fafd52fbc115a67e56db6e6a2d3875

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/index.tssrc/index.ts
@@ -115,7 +115,7 @@ if (         parseIfModifiedSinceHeader(request.headers.get("if-modified-since")) >=
         file?.mtime.getTime()
       ) {
-        return new Response("", { status: 304 });
+        return new Response("", { status: 304, headers: defaultHeaders });
       }
       const encodings = (request.headers.get("accept-encoding") || "")
         .split(",")