diff --git a/deno.json b/deno.json index 87293a5..5a992e9 100644 --- a/deno.json +++ b/deno.json @@ -1,7 +1,7 @@ { "name": "@andyburke/serverus", "description": "A flexible HTTP server for mixed content. Throw static files, markdown, Typescript and (hopefully, eventually) more into a directory and serverus can serve it up a bit more like old-school CGI.", - "version": "0.12.0", + "version": "0.12.1", "license": "MIT", "exports": { ".": "./serverus.ts", diff --git a/handlers/static.ts b/handlers/static.ts index 7104557..1292735 100644 --- a/handlers/static.ts +++ b/handlers/static.ts @@ -299,10 +299,11 @@ export default async function handle_static_files(request: Request, server: SERV const query = Object.fromEntries(new URL(request.url).searchParams.entries()); for await (const precheck of prechecks) { - const error_response: Response | undefined = await precheck(request, { + const metadata = { cookies, query - }); + }; + const error_response: Response | undefined = await precheck(request, metadata); if (error_response) { return error_response; } diff --git a/handlers/typescript.ts b/handlers/typescript.ts index e48f9e5..1493caa 100644 --- a/handlers/typescript.ts +++ b/handlers/typescript.ts @@ -5,7 +5,6 @@ */ import { walk } from '@std/fs'; -import { delay } from '@std/async/delay'; import * as path from '@std/path'; import { getCookies } from '@std/http/cookie'; import { PRECHECK } from '../server.ts';