-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Hello,
is it possible to redirect from http to https like the following this?
sub vcl_recv {
if (client.ip != "127.0.0.1" && req.http.host ~ "foobar.com") {
set req.http.x-redir = "https://foobar.com" + req.url;
return(synth(850, ""));
}
}
sub vcl_synth {
if (resp.status == 850) {
set resp.http.Location = req.http.x-redir;
set resp.status = 301;
return (deliver);
}
}
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels