We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
next()
middleware declared in _middleware files do not work properly when ctx.next() is called.
_middleware
ctx.next()
/ ├── /main.ts ├── /routes │ ├── index.tsx │ └── middleware.tsx ├── /utils.ts └── ...
Steps to reproduce:
deno run -Ar jsr:@fresh/[email protected]
/routes/_middleware.tsx
// /routes/_middleware.ts import { define } from "../utils.ts"; export default define.middleware((ctx) => { console.log(`${ctx.req.method} ${ctx.req.url}`); return ctx.next(); });
This should invoke the routes/index.tsx handler according to the doc but always returns a not found response.
routes/index.tsx
not found
The same middleware declared in main.ts works as expected.
main.ts
The text was updated successfully, but these errors were encountered:
fix: middleware default export ignored (#2680)
5f65747
Fixes #2657
Successfully merging a pull request may close this issue.
middleware declared in
_middleware
files do not work properly whenctx.next()
is called.Steps to reproduce:
deno run -Ar jsr:@fresh/[email protected]
/routes/_middleware.tsx
fileThis should invoke the
routes/index.tsx
handler according to the doc but always returns anot found
response.The same middleware declared in
main.ts
works as expected.The text was updated successfully, but these errors were encountered: