To mitigate against internal IP address disclosure in Basic Authentication Header, i’d like to change the IP address to some other value.
I tried changing “Basic Auth Realm” in http profile but it only works for some testing tools like wfetch but not for curl.
I also tried the following irule but it also works sometimes:
when HTTP_RESPONSE {
if { [HTTP::header “WWW-Authenticate”] starts_with “Basic” }{
HTTP::header replace WWW-Authenticate “Basic realm=‘mydomain.com’”
}
}