Hi,
I'm trying to use the map directive to rewrite the URL arg of my request to force https instead of http.
Example :
Request is : "GET https://www.mywebsite.com/?url=http://www.mysecondwebsite.com"
In this example, i'm trying to rewrite the http in the URL arg with https to obtain "GET https://www.mywebsite.com/?url=httpS://www.mysecondwebsite.com"
Using this configuration :
map $arg_url $arg_url_https {
default $arg_url;
"~*http:(?<suite>.+)" https:$suite;
}
But concat of "https: + $suite" just makes the text value "https:$suite" instead of interpreting the $suite value.
$suite works well when alone.
If you have any solution or another directive that could be used to force https in the url arg, it could be great.
This is part of a reverse proxy setup using the url arg in the proxy_pass directive to forward traffic.
Thanks
Alex