Forum Discussion

GBurch's avatar
GBurch
Icon for Altostratus rankAltostratus
Dec 18, 2017

Insert header to control google account login

I've been asked to set up our F5 SWG Gateways to prevent users from signing into Google services using their private accounts.

Google provide instructions for this here, based on which I've put the following iRule together:

when HTTP_REQUEST {
    if { [HTTP:host] equals "*.google.com"}{
        HTTP::header insert "X-GoogApps-Allowed-Domains" ".com"
    }
}

I don't have much experience with iRules (or a DEV environment), does this look correct?

There's a good chance I'll need to create other 'website specific' iRules in the future. In terms of performance, am I best creating them all in the same iRule with different conditions, or should each one have it's one iRule?

Many thanks

No RepliesBe the first to reply