Package org.microproxy.extras
Class AntiCache
java.lang.Object
org.microproxy.extras.AntiCache
- All Implemented Interfaces:
HttpFiltersSource
Removes the request headers that let a server answer
304 Not Modified (
If-None-Match and If-Modified-Since), as mitmproxy's anticache, so that clients
get whole responses, which other addons and recorders can then see. Reads heads only.
bootstrap.plusFiltersSource(AntiCache.create());
-
Method Summary
Modifier and TypeMethodDescriptionstatic AntiCachecreate()Strips the conditional headers from every request.filterRequest(HttpRequest originalRequest, FlowContext flowContext) Returns the filters for a request, ornullto proxy it unfiltered.static AntiCachematching(FlowFilter filter) Strips the conditional headers from the requestsfiltermatches (body matchers do not match: the body is never buffered for this).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.microproxy.HttpFiltersSource
getMaximumRequestBufferSizeInBytes, getMaximumResponseBufferSizeInBytes
-
Method Details
-
create
Strips the conditional headers from every request.- Returns:
- the addon
-
matching
Strips the conditional headers from the requestsfiltermatches (body matchers do not match: the body is never buffered for this).- Parameters:
filter- the requests to change- Returns:
- the addon
-
filterRequest
Description copied from interface:HttpFiltersSourceReturns the filters for a request, ornullto proxy it unfiltered.- Specified by:
filterRequestin interfaceHttpFiltersSource- Parameters:
originalRequest- a copy of the request as received from the clientflowContext- the client connection the request arrived on- Returns:
- the per-request filters, or
nullto leave the request unfiltered
-