sub vcl_recv {
if ( req.http.X-Forwarded-Proto !~ "(?i)https") {
set req.http.x-Redir-Url = "http://" + ...req url;
}else{
set req.http.x-Redir-Url = "https://" + ...req url;
}
}
Sorry, I have updated the code now. This is what I meant.