Package org.spincast.plugins.undertow
Class CacheBusterRemovalHandlerDefault
java.lang.Object
org.spincast.plugins.undertow.CacheBusterRemovalHandlerDefault
- All Implemented Interfaces:
io.undertow.server.HttpHandler
,CacheBusterRemovalHandler
Handler to remove cache buster codes from the request URL.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCacheBusterRemovalHandlerDefault
(io.undertow.server.HttpHandler next, SpincastUtils spincastUtils, SpincastUndertowUtils spincastUndertowUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.undertow.server.HttpHandler
getNext()
getOrigninalRequestUrlWithPotentialCacheBusters
(io.undertow.server.HttpServerExchange exchange) Get the original URL of the request potentially containing cache busters.protected SpincastUndertowUtils
protected SpincastUtils
void
handleRequest
(io.undertow.server.HttpServerExchange exchange) protected void
keepOriginalRequestUrlInformation
(io.undertow.server.HttpServerExchange exchange) protected void
removeCacheBusterCode
(io.undertow.server.HttpServerExchange exchange)
-
Field Details
-
EXCHANGE_VARIABLE_ORIGINAL_REQUEST_URL
-
-
Constructor Details
-
CacheBusterRemovalHandlerDefault
public CacheBusterRemovalHandlerDefault(io.undertow.server.HttpHandler next, SpincastUtils spincastUtils, SpincastUndertowUtils spincastUndertowUtils)
-
-
Method Details
-
getNext
protected io.undertow.server.HttpHandler getNext() -
getSpincastUtils
-
getSpincastUndertowUtils
-
handleRequest
- Specified by:
handleRequest
in interfaceio.undertow.server.HttpHandler
- Throws:
Exception
-
keepOriginalRequestUrlInformation
protected void keepOriginalRequestUrlInformation(io.undertow.server.HttpServerExchange exchange) -
getOrigninalRequestUrlWithPotentialCacheBusters
public String getOrigninalRequestUrlWithPotentialCacheBusters(io.undertow.server.HttpServerExchange exchange) Description copied from interface:CacheBusterRemovalHandler
Get the original URL of the request potentially containing cache busters. The URL is not decoded.- Specified by:
getOrigninalRequestUrlWithPotentialCacheBusters
in interfaceCacheBusterRemovalHandler
-
removeCacheBusterCode
protected void removeCacheBusterCode(io.undertow.server.HttpServerExchange exchange)
-