Package io.undertow.server.handlers
Class AccessControlListHandler
java.lang.Object
io.undertow.server.handlers.AccessControlListHandler
- All Implemented Interfaces:
HttpHandler
Handler that can accept or reject a request based on an attribute of the remote peer
todo: should we support non-regex values for performance reasons?
- Author:
- Stuart Douglas, Andre Dietisheim
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAccessControlListHandler
(ExchangeAttribute attribute) AccessControlListHandler
(HttpHandler next, ExchangeAttribute attribute) -
Method Summary
Modifier and TypeMethodDescriptionAdds an allowed user agent peer to the ACL listAdds an denied user agent to the ACL listgetNext()
void
handleRequest
(HttpServerExchange exchange) Handle the request.boolean
setDefaultAllow
(boolean defaultAllow) setNext
(HttpHandler next)
-
Constructor Details
-
AccessControlListHandler
-
AccessControlListHandler
-
-
Method Details
-
handleRequest
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
isDefaultAllow
public boolean isDefaultAllow() -
setDefaultAllow
-
getNext
-
setNext
-
addAllow
Adds an allowed user agent peer to the ACL listUser agent may be given as regex
- Parameters:
pattern
- The pattern to add to the ACL
-
addDeny
Adds an denied user agent to the ACL listUser agent may be given as regex
- Parameters:
pattern
- The user agent to add to the ACL
-
clearRules
-