Browser Cookie Support Required iRule Using Modernizr
Problem this snippet solves: Validates (using JavaScript) that the client browser supports cookies before continuing. It's a good idea to back up the Modernizr script libraries and store them locall...
Published Aug 02, 2016
Version 1.0Jer-O
Cirrus
Joined May 16, 2019
Jer-O
Cirrus
Joined May 16, 2019
Kai_Wilke
Aug 03, 2016MVP
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