poem icon indicating copy to clipboard operation
poem copied to clipboard

Allow paths to be excluded when using ForceHTTPS

Open andrewthetechie opened this issue 2 years ago • 0 comments

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 avatar Aug 04 '22 14:08 andrewthetechie

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

https://github.com/poem-web/poem/blob/80f118adce6819914dce254a1815adf16572d94a/poem/src/middleware/force_https.rs#L33

sunli829 avatar Sep 02 '22 05:09 sunli829

Very cool! Thanks :)

andrewthetechie avatar Sep 02 '22 14:09 andrewthetechie