This commit is contained in:
Rizky 2023-10-19 07:53:47 +07:00
parent 2e416d5a58
commit 3f621f44ad
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ export const createServer = async () => {
} }
const found = cache.static[url.pathname]; const found = cache.static[url.pathname];
const enc = req.headers.get("accept-encoding"); const enc = req.headers.get("accept-encoding");
if (enc) { if (enc && g.mode === "prod") {
if (enc.includes("br") && found.br) { if (enc.includes("br") && found.br) {
const res = new Response(found.br); const res = new Response(found.br);
res.headers.set("Content-Encoding", "br"); res.headers.set("Content-Encoding", "br");