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

Allow paths to be excluded when using ForceHTTPS #360

Closed
andrewthetechie opened this issue Aug 4, 2022 · 2 comments
Closed

Allow paths to be excluded when using ForceHTTPS #360

andrewthetechie opened this issue Aug 4, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@andrewthetechie
Copy link

Description of the feature

I use the ForceHTTPS middleware to redirect requests to HTTPS for my app. Unfortunately, this causes problems when deploying in k8s with health checks.

I'd like to be able to exclude a path from ForceHTTPS

@andrewthetechie andrewthetechie added the enhancement New feature or request label Aug 4, 2022
@sunli829
Copy link
Collaborator

sunli829 commented Sep 2, 2022

I added a filter method, which should solve the problem.

pub fn filter(self, predicate: impl Fn(&Request) -> bool + Send + Sync + 'static) -> Self {

@andrewthetechie
Copy link
Author

Very cool! Thanks :)

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

No branches or pull requests

2 participants