Skip to content

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...]
ParametersDescriptionDetailed Documentation
patternExpression to match request URLsMatch Pattern Documentation
actionSpecific action, see the description below
filtersOptional filters, supports matching:
• Request URL/Method/Headers/Content
• Response Status Code/Headers
Filter Documentation
  • 301: Disable 301 redirects, force 301 to 302 (can also use replaceStatus)
  • abort: Disable the abort feature, see: enable
  • abortReq: Disable the abortReq feature, see: enable
  • abortRes: Disable the abortRes feature, see: enable
  • authCapture: Disable the authCapture feature, see: enable
  • auto2http: Disable the auto2http feature, see: enable
  • autoCors: 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 via disable://autoCors
  • ajax: Remove the request header x-requested-with
  • bigData: Disable the bigData feature, see: enable
  • capture or https: Disable Enable HTTPS, see: enable
  • captureIp: Disable the captureIp feature, see: enable
  • captureStream: Disable the captureStream feature, see: enable
  • clientCert: Disable the clientCert feature, see: enable
  • clientId: Remove the request header x-whistle-client-id
  • clientIp: Remove the request header x-forwarded-for
  • customParser: Disable the customParser feature, see: enable
  • cache: Disable caching
  • dnsCache: Disable DNS caching
  • csp: Disable CSP
  • cookies: Disable cookies for requests and responses
  • reqCookies: Disable request cookies
  • resCookies: Disable response cookies
  • flushHeaders: Disable the flushHeaders feature, see: enable
  • forHttp: Disable the forHttp feature, see: enable
  • forHttps: Disable the forHttps feature, see: enable
  • forceReqWrite: Disable the forceReqWrite feature, see: enable
  • forceResWrite: Disable the forceResWrite feature, see: enable
  • gzip: Disable response compression
  • h2: Disable the h2 feature, see: enable

    Disable: Whistle proxy -xx-> server enables HTTP2

  • http2: Disable the http2 feature, see: enable

    Disable: Browser -xx-> Whistle proxy -xx-> server all enable HTTP2

  • httpH2: Disable the httpH2 feature, see: enable

    Disable: Whistle proxy -xx-> server HTTP requests enable HTTP2

  • hide: Disable the hide feature, see: enable
  • hideComposer: Disable the hideComposer feature, see: enable
  • hideCaptureError: Disable the hideCaptureError feature, see: enable
  • interceptConsole: Disable the interceptConsole feature, see: enable
  • internalProxy: Disable the internalProxy feature, see: enable
  • proxyFirst: Disable prioritizing the use of proxy rules
  • proxyHost: Disable the proxyHost feature, see: enable
  • proxyTunnel: Disable the proxyTunnel feature, see: enable
  • keepCSP: Disable the keepCSP feature, see: enable
  • keepAllCSP: Disable the keepAllCSP feature, see: enable
  • keepCache: Disable the keepCache feature, see: enable
  • keepAllCache: Disable the keepAllCache feature, see: enable
  • keepAlive: Disable caching of request connections
  • keepClientId: Disable the keepClientId feature, see: enable
  • keepH2Session: No need for each TUNNEL connection to correspond to one HTTP2 connection (default is yes, recommended to use default)
  • safeHtml: Disable the safeHtml feature, see: enable
  • strictHtml: Disable the strictHtml feature, see: enable
  • proxyConnection: Set proxy-connection: close when forwarding requests via proxy, socks, or other proxy protocols
  • ua: Remove the request header user-agent
  • proxyUA: Remove the request header user-agent when forwarding requests via proxy, socks, or other proxy protocols
  • referer: Disable referer
  • rejectUnauthorized: Set rejectUnauthorized to true
  • requestWithMatchedRules: Disable the requestWithMatchedRules feature, see: enable
  • responseWithMatchedRules: Disable the responseWithMatchedRules feature, see: enable
  • secureOptions: Disable the default options for establishing HTTP2 connections
  • timeout: Disable request timeout settings
  • trailerHeader: Remove the response header trailer
  • trailers: Remove trailers
  • tunnelAuthHeader: Remove the proxy authentication header proxy-authorization
  • tunnelHeadersFirst: Disable the tunnelHeadersFirst feature, see: enable
  • useLocalHost: Disable the useLocalHost feature, see: enable
  • useSafePort: Disable the useSafePort feature, see: enable
  • userLogin: Disable showing the login box when setting statusCode://401
  • weakRule: 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