fix: let's move the metadata to where it will actually retain a
reference
This commit is contained in:
parent
0181d8ce5b
commit
da30c60896
2 changed files with 6 additions and 5 deletions
|
@ -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.1",
|
||||
"version": "0.12.2",
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": "./serverus.ts",
|
||||
|
|
|
@ -298,11 +298,12 @@ export default async function handle_static_files(request: Request, server: SERV
|
|||
const cookies: Record<string, string> = getCookies(request.headers);
|
||||
const query = Object.fromEntries(new URL(request.url).searchParams.entries());
|
||||
|
||||
for await (const precheck of prechecks) {
|
||||
const metadata = {
|
||||
cookies,
|
||||
query
|
||||
};
|
||||
|
||||
for await (const precheck of prechecks) {
|
||||
const error_response: Response | undefined = await precheck(request, metadata);
|
||||
if (error_response) {
|
||||
return error_response;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue