Hi,
In theory, the string map command should only ever replace http:// with https:// one time. Can you add logging to the rule to see what the Location header value is before you make the change and after?
when HTTP_RESPONSE {
if { [HTTP::status] == 302" } {
log local0. "[IP::client_addr]:[TCP::client_port]: Rewriting [HTTP::header Location] to [string map {http:// https://} [HTTP::header Location]]"
respond with 302 using original Location value
HTTP::respond 302 Location [string map {"http://" "https://"} [HTTP::header Location]]
}
}
Aaron