actix-web-middleware-redirect-https
A middleware for actix-web which forwards all http requests to https with optional url string replacement.
Note: Consider using this fork instead
Usage
# Cargo.toml
[]
= "3.0.1"
use ;
use RedirectHTTPS;
new
.wrap
.route;
By default, the middleware simply replaces the scheme of the URL with https://, but you may need to it to change other parts of the URL.
For example, in development if you are not using the default ports (80 and 443) then you will need to specify their replacement, as below:
use ;
use RedirectHTTPS;
new
.wrap
.route;