disable
Disable HTTPS, hide requests, terminate requests, and other features through rules.
Rule Syntax
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 |
capture
orhttps
: DisableEnable HTTPS
authCapture
: Disable theauthCapture
feature, see enable for detailsabort
: Disable abort For details, see: enableabortReq
: Disables the abortReq feature. For details, see: enableabortRes
: Disables the abortRes feature. For details, see: enablegzip
: Disables response content compressionproxyHost
: Disables the proxyHost feature. For details, see: enableproxyTunnel
: Disables the proxyTunnel feature. For details, see: enableproxyFirst
: Disables the use of the proxy rule first
http2
: Disables the http2 feature. For details, see: enableh2
: Disables the h2 feature. For details, see: enablehttpH2
: Disables httpH2 For details, see: enablesafeHtml
: Disables the safeHtml feature. For details, see: enablestrictHtml
: Disables the strictHtml feature. For details, see: enableclientIp
: Removes the x-forwarded-for request headerbigData
: Disables the bigData feature. For details, see: enableforceReqWrite
: Disables the forceReqWrite feature. For details, see: enableforceResWrite
: Disables the forceResWrite feature. For details, see: enableauto2http
: Disables the auto2http feature. For details, see: enablehide
: Disables the hide feature. For details, see: enableuseLocalHost
: Disable theuseLocalHost
feature. For details, see: enableuseSafePort
: Disable theuseSafePort
feature. For details, see: enablecookies
: Disable request and response cookiesreqCookies
: Disable request cookiesresCookies
: Disable response cookiesua
: Disableuser-agent
referer
: Disablereferer
csp
: Disable CSPcache
: Disable caching301
: Disable 301 redirects, force 301 redirects to 302dnsCache
: Disable DNS cachingajax
: Remove thex-requested-with
request headerkeepAlive
: Disable caching of request connectionstimeout
: Disable request timeout settingsautoCors
: When using the file protocol to replace a request, if Whistle detects that the request is cross-origin, it will automatically add the necessary CORS (Cross-Origin Resource Sharing) headers. This can be disabled usingdisable://autoCors
.userLogin
: Disables the login dialog when setting statusCode://401.
Configuration Example
# 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