Skip to content

Conversation

u5surf
Copy link
Contributor

@u5surf u5surf commented Oct 19, 2021

Fixes #850

I implemented reset_middleware in Server according to
#850 (comment)

assert!(res.header("X-Root").is_none());
assert_eq!(res["X-Foo"], "foo");
Ok(())
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test should be added to ensure that previously defined routes on the app (i.e. those before line 136) still use the initially set middleware.

@mdtusz
Copy link

mdtusz commented Nov 26, 2021

I'm not a maintainer, but lgtm!

@mdtusz
Copy link

mdtusz commented Dec 9, 2021

@Fishrock123 do you think it's worth getting this in to include in the v0.17 realease?

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

Successfully merging this pull request may close these issues.

reset_middleware() doesn't prevent middleware from running for route
2 participants