Forum Discussion
SanjayP
Jul 15, 2021Nacreous
You can try below
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"service-api.xx.com"
{
if { [HTTP::header exists "Auth_header"] } {
set token [HTTP::header value Auth_header]
HTTP::respond 301 Location https://newservice.api.xx.com/test-cg[HTTP::uri]" "Auth_header" "$token"
return
}
} default {
return
}
}
}