Forum Discussion
Tny81
Nimbostratus
Oct 26, 2020401 unauthorized return if header doesn't match
Is there a way I can write an irule so when a GET request comes to a VS on a specific URL: https://abctest1234.com/general/api, if a header value does not match on multiple ClientID such as (ClientID...
- Aug 04, 2014
Can the sessions be replaced with connectionswith the way you are prescribing?
if you want to track tcp connection, you may increase the counter in CLIENT_ACCEPTED and decrease it in CLIENT_CLOSED.
when HTTP_REQUEST {
if { [[HTTP::host][HTTP::uri] eq "abctest1234.com/general/api"] && [[HTTP::header value "ClientID"] ne "RealCategory" || [HTTP::header value "ClientID"] ne "TrueCategory" || [HTTP::header value "ClientID"] ne "BlueCategory"]}{
HTTP::respond 401
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects