Browser Cookie Support Required iRule Using Modernizr
Published Aug 02, 2016
Version 1.0Was this article helpful?
The snippet looks very elegant! 🙂
Note: To make the ordering of the iRules more robust, you could tweak the iRule a little bit, so that your iRule could be assigned with the highest priority (would make much sense to check this iRule before processing other iRules, right?).
Just issue a
event disable all
and TCP::close
right after HTTP::respond
to stop further iRule processing on the current TCP connection and to get rid of possible "Operation not supported. Multiple redirect/respond invocations not allowed.." error messages.
If you want o stick with the approach to assign the lowest priority to your iRule, then you may want to include a
if { [catch {HTTP::payload replace 0 0 {}}] } then { return }
check at the beginning of this iRule to see if other iRules with lower priorities had already responded the HTTP request (e.g. some Redirect) to avoid the "Operation not supported..." error messages.
Cheers, Kai