disable
Disable HTTPS, hide requests, terminate requests, and other features through rules.
Rule Syntax
txt
pattern disable://action1|action2|... [filters...]
# Equivalent to:
pattern disable://action1 disable://action2 ... [filters...]
Parameters | Description | Detailed Documentation |
---|---|---|
pattern | Expression to match request URLs | Match Pattern Documentation |
action | Specific action, see the description below | |
filters | Optional filters, supports matching: • Request URL/Method/Headers/Content • Response Status Code/Headers | Filter Documentation |
301
: Disable301
redirects, force301
to302
(can also use replaceStatus)abort
: Disable the abort feature, see: enableabortReq
: Disable the abortReq feature, see: enableabortRes
: Disable the abortRes feature, see: enableauthCapture
: Disable theauthCapture
feature, see: enableauto2http
: Disable the auto2http feature, see: enableautoCors
: When using the file protocol to replace requests, if Whistle detects that the request is a cross-origin request, it automatically adds necessary CORS (Cross-Origin Resource Sharing) headers. This can be disabled viadisable://autoCors
ajax
: Remove the request headerx-requested-with
bigData
: Disable the bigData feature, see: enablecapture
orhttps
: DisableEnable HTTPS
, see: enablecaptureIp
: Disable the captureIp feature, see: enablecaptureStream
: Disable the captureStream feature, see: enableclientCert
: Disable the clientCert feature, see: enableclientId
: Remove the request headerx-whistle-client-id
clientIp
: Remove the request headerx-forwarded-for
customParser
: Disable the customParser feature, see: enablecache
: Disable cachingdnsCache
: Disable DNS cachingcsp
: Disable CSPcookies
: Disable cookies for requests and responsesreqCookies
: Disable request cookiesresCookies
: Disable response cookiesflushHeaders
: Disable the flushHeaders feature, see: enableforHttp
: Disable the forHttp feature, see: enableforHttps
: Disable the forHttps feature, see: enableforceReqWrite
: Disable the forceReqWrite feature, see: enableforceResWrite
: Disable the forceResWrite feature, see: enablegzip
: Disable response compressionh2
: Disable the h2 feature, see: enableDisable: Whistle proxy -xx-> server enables HTTP2
http2
: Disable the http2 feature, see: enableDisable: Browser -xx-> Whistle proxy -xx-> server all enable HTTP2
httpH2
: Disable the httpH2 feature, see: enableDisable: Whistle proxy -xx-> server HTTP requests enable HTTP2
hide
: Disable the hide feature, see: enablehideComposer
: Disable the hideComposer feature, see: enablehideCaptureError
: Disable the hideCaptureError feature, see: enableinterceptConsole
: Disable the interceptConsole feature, see: enableinternalProxy
: Disable the internalProxy feature, see: enableproxyFirst
: Disable prioritizing the use of proxy rulesproxyHost
: Disable the proxyHost feature, see: enableproxyTunnel
: Disable the proxyTunnel feature, see: enablekeepCSP
: Disable the keepCSP feature, see: enablekeepAllCSP
: Disable the keepAllCSP feature, see: enablekeepCache
: Disable the keepCache feature, see: enablekeepAllCache
: Disable the keepAllCache feature, see: enablekeepAlive
: Disable caching of request connectionskeepClientId
: Disable the keepClientId feature, see: enablekeepH2Session
: No need for each TUNNEL connection to correspond to one HTTP2 connection (default isyes
, recommended to use default)safeHtml
: Disable the safeHtml feature, see: enablestrictHtml
: Disable the strictHtml feature, see: enableproxyConnection
: Setproxy-connection: close
when forwarding requests via proxy, socks, or other proxy protocolsua
: Remove the request headeruser-agent
proxyUA
: Remove the request headeruser-agent
when forwarding requests via proxy, socks, or other proxy protocolsreferer
: Disablereferer
rejectUnauthorized
: SetrejectUnauthorized
totrue
requestWithMatchedRules
: Disable the requestWithMatchedRules feature, see: enableresponseWithMatchedRules
: Disable the responseWithMatchedRules feature, see: enablesecureOptions
: Disable the defaultoptions
for establishing HTTP2 connectionstimeout
: Disable request timeout settingstrailerHeader
: Remove the response headertrailer
trailers
: Remove trailerstunnelAuthHeader
: Remove the proxy authentication headerproxy-authorization
tunnelHeadersFirst
: Disable the tunnelHeadersFirst feature, see: enableuseLocalHost
: Disable the useLocalHost feature, see: enableuseSafePort
: Disable the useSafePort feature, see: enableuserLogin
: Disable showing the login box when setting statusCode://401weakRule
: Disable the weakRule feature, see: enable
Configuration Example
txt
# Disable request caching and remove cache fields from both request and response headers.
# Unlike the cache protocol, cache only sets cache headers for responses.
wwww.example.com/path disable://cache
# Disable cookies for both requests and responses.
wwww.example.com/path disable://cookies
# Disable cookies for requests only.
wwww.example.com/path disable://reqCookies
# Disable cookies for responses only.
wwww.example.com/path disable://resCookies
# Remove user-agent.
wwww.example.com/path disable://ua
# Delete the referer
wwww.test.com/path disable://referer
# Delete the CSP policy
wwww.test.com/path disable://csp
# Disable the timeout. By default, Whistle will consider a request timed out if no data is transferred within 36 seconds.
wwww.test.com/path disable://timeout
# Convert 301 responses to 302s to prevent caching
wwww.test.com/path disable://301
# Disable HTTPS interception
wwww.test.com/path disable://capture
# Do not cache DNS results
wwww.test.com/path disable://dnsCache
# Disable proxy server request connection reuse
wwww.test.com/path disable://keepAlive
# Delete the `x-requested-with` request header
wwww.test.com/path disable://ajax
# You can also disable multiple requests simultaneously.
www.example.com/path disable://cache|cookies|ua|referer|csp|timeout|301|intercept|dnsCache|keepAlive|autoCors
Association operation: enable