Skip to content

Rule Engine

This page is automatically synced from docs-en/rule.md. Language: English | 中文

A Bifrost rule line combines a pattern with one or more operations and optional filters or line properties.

pattern operation [operations...] [filters...] [lineProps://...]
example.com host://127.0.0.1:3000
api.example.com reqHeaders://x-debug=1
chatgpt.com http3://
internal-api.example.test https://10.37.102.138:8080 upstreamUnsafeSsl://true
api.example.com/v1/users tlsIntercept:// host://127.0.0.1:3000
  • Routing operations such as host://, proxy://, http://, https://, ws://, and wss:// decide where traffic goes.
  • Modification operations such as reqHeaders://, resHeaders://, statusCode://, reqBody://, and resBody:// 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.