Skip to content

replaceStatus

Replaces the HTTP status code. After the request is responded to, the original status code is replaced with the specified HTTP status code.

Rule Syntax

txt
pattern replaceStatus://value [filters...]
ParametersDescriptionDetailed Documentation
patternExpression to match the request URLMatch Pattern Documentation
valueResponse status code, such as 200/302/404, etc.
filtersOptional filters, supporting matching:
• Request URL/Method/Headers/Content
• Response status code/Headers
Filter Documentation

Configuration Example

txt
# Visit `https://www.example.com/path/to` and the browser will prompt you to enter your username and password.
www.example.com/path replaceStatus://401

# You can disable the login pop-up using disable / lineProps
www.example.com/path replaceStatus://401 disable://userLogin
  1. Set the status code for a direct response: statusCode
  2. Disable the login dialog: enable or lineProps