Skip to content
New issue

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

[[email protected]] File-based routing has inconsisten middleware behavior #2588

Open
miguelrk opened this issue Jul 10, 2024 · 0 comments
Open

Comments

@miguelrk
Copy link

From this thread:

_middleware.ts files will not run the handler sometimes (I tried all handler signatures). It is pretty inconsistent, sometimes it runs (e.g. for /route/one, and then for /route/two it won't run. I might be doing something wrong (don't think so this time, I have the WIP docs revamped for Fresh 2.0 open), but I can confirm that at a minimum, the behavior is different than that of _middleware.ts files in fresh 1.x (not sure if intended or not). Funny enough, not doing file-based routing and using app.use((ctx) => {...}) directly instead, in e.g. main.ts with the same handler as in the _middleware.ts file, works normally as it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant