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

Implement reset_middleware in Server #855

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

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