chore: update deps (#561)

Update std, esbuild, and preact.
This commit is contained in:
Luca Casonato
2022-07-30 17:29:29 +02:00
committed by GitHub
parent a6aac89663
commit ba20756c17
18 changed files with 75 additions and 71 deletions
+3 -3
View File
@@ -2,10 +2,10 @@ import {
ConnInfo,
extname,
fromFileUrl,
mediaTypeLookup,
RequestHandler,
router,
toFileUrl,
typeByExtension,
walk,
} from "./deps.ts";
import { h } from "preact";
@@ -224,7 +224,7 @@ export class ServerContext {
const localUrl = toFileUrl(entry.path);
const path = localUrl.href.substring(staticFolder.href.length);
const stat = await Deno.stat(localUrl);
const contentType = mediaTypeLookup(extname(path)) ??
const contentType = typeByExtension(extname(path)) ??
"application/octet-stream";
const etag = await crypto.subtle.digest(
"SHA-1",
@@ -559,7 +559,7 @@ export class ServerContext {
"Cache-Control": "public, max-age=604800, immutable",
});
const contentType = mediaTypeLookup(path);
const contentType = typeByExtension(extname(path));
if (contentType) {
headers.set("Content-Type", contentType);
}