Forum Discussion
MSZ
Nimbostratus
Apr 06, 2016How can we block the Basic Authentication Page?
HTTP/1.1 401 Unauthorized
Date: Tue, XX Mar XXXX 14:42:11 GMT
Www-authenticate: Basic realm="Oracle iPlanet Web Server"
Content-length: 223
Content-type: text/html
Connection: close
Unauthorized...
Stanislas_Piro2
Cumulonimbus
Apr 06, 2016Hi,
what do you need exactly?
if the server request authentication, you won't be able to browse it before being authenticated.
do you want to deny access to password protected ressources on the web site?
You can block 401 response code and replace it by a "access denied" with 403 response code in a irule or with ASM
Do not forget to remove Authorization header in request to prevent user to insert it even if the server never sent 401 request.
when HTTP_REQUEST {
HTTP::header remove Authorization
}
when HTTP_RESPONSE {
if { [HTTP::status] eq "401" } {
HTTP::respond 403 content {
Denied
Page Denied
} noserver "Connection" "Close"
return
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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