Rule Engine
This page is automatically synced from
docs-en/rule.md. Language: English | 中文
Rule Syntax
Section titled “Rule Syntax”A Bifrost rule line combines a pattern with one or more operations and optional filters or line properties.
pattern operation [operations...] [filters...] [lineProps://...]Examples
Section titled “Examples”example.com host://127.0.0.1:3000api.example.com reqHeaders://x-debug=1chatgpt.com http3://internal-api.example.test https://10.37.102.138:8080 upstreamUnsafeSsl://trueapi.example.com/v1/users tlsIntercept:// host://127.0.0.1:3000Rule Types
Section titled “Rule Types”- Routing operations such as
host://,proxy://,http://,https://,ws://, andwss://decide where traffic goes. - Modification operations such as
reqHeaders://,resHeaders://,statusCode://,reqBody://, andresBody://change traffic. - Filters narrow when a rule applies.
- Line properties control metadata such as disabled or important status.
Read Operation reference and Rules protocol reference for details.