fix: layered middleware not working for index page (#407)
This commit fixes layered middleware not being invoked for the the index page of the layer. For example: routes/api/_middleware.ts was not being invoked for /api, only /api/foobar
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Handlers } from "../../../../../server.ts";
|
||||
|
||||
interface State {
|
||||
root: string;
|
||||
layer1: string;
|
||||
layer2: string;
|
||||
}
|
||||
|
||||
export const handler: Handlers<undefined, State> = {
|
||||
GET(_req: Request, { state }) {
|
||||
return new Response(JSON.stringify(state));
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user