Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

PG0581's avatar
PG0581
Icon for Cirrus rankCirrus
4 years ago
Solved

Host header injection iRule

I would like to create an iRule that whitelists based on the HTTP host header value, and if that matches redirect to HTTPS.  Can someone confirm if what I have will work?      ltm rule whitelist...
  • Enes_Afsin_Al's avatar
    4 years ago

    Hi PG0581,

    when HTTP_REQUEST {
    	if { [HTTP::host] eq "abc.com" } {
    		HTTP::redirect "https://abc.com[HTTP::uri]"
    		return
    	} else {
    		HTTP::respond 400 content "Bad Request" "Content-Type" "text/html"
    	}
    }