Forum Discussion
JP_135500
Jan 31, 2014Nimbostratus
Only enable access policy when server response is 401?
We have a site that is a mix of anonymous and authenticated content. The authenticated content lives all over within the site and is maintained by hundreds of content editors, so there's really no pa...
- Jan 31, 2014
TO add to Josh's suggestion.
If you see the 401 from the server in HTTP_RESPONSE, add some cookie or other marker and redirect client back to the VIP. If the cookie or other marker is seen, then do ACCESS::enable.
Stanislas_Piro2
Jul 08, 2014Cumulonimbus
Hi,
I had the same need for one customer.
to follow user session, I checked if APM cookie exist.
when CLIENT_ACCEPTED {
set request_headers ""
set need_creds 0
}
when HTTP_REQUEST {
set apm_cookie [HTTP::cookie value MRHSession]
set request_headers [HTTP::request]
if { $need_creds == 1 || $apm_cookie != "" } {
ACCESS::enable
} else {
ACCESS::disable
}
}
when HTTP_RESPONSE {
if {[HTTP::status] == 401 && $need_creds == 0} {
set need_creds 1
HTTP::retry $request_headers
}
}
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