Forum Discussion
TJ_Vreugdenhil
Mar 03, 2014Cirrus
APM W3C Local Logging iRule
Hi
We are using the local logging irule found here on devcentral:
https://devcentral.f5.com/wiki/irules.FormattedLoggingForW3c.ashx
Everything seems to populate correctly, except for the H...
Kevin_Stewart
Mar 03, 2014Employee
The HTTP::username command is used to retrieve the username from an HTTP Basic authentication request (Header: Authorization: Basic [bsae64-encoded user:pass]. So you would necessarily need to prompt the user for Basic authentication in order to get this value:
if { not ( [HTTP::header exists Authorization] ) } {
set body "Authentication FailuredError: Authentication Failure"
HTTP::respond 401 content $body WWW-Authenticate "Basic realm=\"[HTTP::header Host]\"" Connection Close
}
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