fix: keep a ref to the metadata so it can be passed through prechecks
This commit is contained in:
parent
046617bc4f
commit
0181d8ce5b
3 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue