danielSanchezQ / warp-reverse-proxy

Fully composable warp filter that can be used as a reverse proxy.
https://github.com/danielSanchezQ/warp-reverse-proxy
MIT License
48 stars 18 forks source link

Optionally allow insecure HTTPS requests #43

Closed jtroo closed 3 years ago

jtroo commented 3 years ago

There are cases where an insecure HTTPS request might be desired, e.g. creating a reverse proxy to a device that has a self-signed certificate. This commit adds a check for an environment variable in the reqwest client initialization to optionally enable insecure certificates.

danielSanchezQ commented 3 years ago

@jtroo Thanks for the PR! It looks helpful but I'm not sure if it is the best way. Seeing now that maybe some client configuration could be required I have something in mind to do it better. I think it is a good solution but too ad-hoc for what a library should be. I will open an issue for this (or feel free to open it) and I will work on it in the next days. Or, if you are down to help I will be glad and open to discussion.

jtroo commented 3 years ago

Agreed, it makes sense to have general reqwest client configuration rather than a one-off for just this functionality.

No need to rush the change for client configuration :) . I added this modification for my use case, and it's sufficient for me.

jtroo commented 3 years ago

Opened issue #44 for this