You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
reset_middleware() doesn't prevent middleware from running for route #850
reset_middleware() doesn't affect which middleware is ran for a route. With the following code, I'd expect a 200 response with the text "Success!". Instead, the log shows:
thread 'async-std/runtime' panicked at 'Middleware panicked.', src\main.rs:25:9
cargo.toml
[package]
name = "tide-middleware-test"version = "0.1.0"edition = "2018"publish = false
[dependencies]
async-std = { version = "1.6.0", features = ["attributes"] }
tide = "0.16.0"
Activity
0b10011 commentedon Sep 20, 2021
It looks like this is specifically due to adding the middleware to
Serverinstead ofRoute. Here's a test for this issue:u5surf commentedon Oct 9, 2021
@jnicklas @0b10011
Hi, I have a simple resolution for this issue.
For example, implement
server.reset_middlewareinstead ofroute.reset_middleware, we are possible to reset middleware which server has.For usages:
According to implementation of
server.reset_middlewarein my local, it seems to be passed this tests.@yoshuawuyts
Can I work on this issue if you approved to resolve this way?