Rewrite HTTPS to HTTP in referer
You can rewrite HTTP request headers to replace all HTTPS addresses with HTTP addresses in the redirect referrer.
Rewrite the HTTP request header to replace HTTPS addresses with HTTP in the redirect referrer:
when HTTP_RESPONSE{
ref = HTTP:header_get_value("Referrer")
if ref then
newref = string.gsub(ref, "https", "http") --replace all https by http in the referrer header
HTTP:header_replace("Referrer", newref);
end
}