Redirect HTTP to HTTPS
This simple option installs a location block to redirect all HTTP traffic to HTTPS.
Itsi.rb
redirect_http_to_https!
It is an alias for:
location protocols: [:http] do
redirect \
to: "https://{host}{path_and_query}", \
type: "moved_permanently"
end
It is subject to ordinary location resolution rules.
To make sure this rule takes precedence, place it above other locations in the Itsi.rb
file