Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,23 @@ proxy:
# trusted_proxies: ["10.0.0.0/8", "127.0.0.1/32"]
# recursive: true
# header: x-forwarded-for
# Entry-level URL rewriting: map legacy URL shapes onto AISIX endpoints
# before routing. The first rule whose `match` regex matches the request
# path rewrites it (once, no cascading); the request then flows through
# the normal endpoint — auth, ACL, quota — as if the client had sent the
# rewritten path. `match` runs against the RAW, percent-encoded path (no
# decoding or normalization); `rewrite` replaces the matched portion
# ($1/${name} expand capture groups; use ${1}text to follow a group with
# literal text); the query string is preserved. Invalid regexes, unknown
# group references, and `?`/`#`/whitespace in the template fail startup.
# In env-only deployments set the whole list as one JSON array:
# AISIX_PROXY__URL_REWRITES='[{"match":"...","rewrite":"..."}]'
# Example: serve per-server MCP URLs like /mcp-servers/github/mcp on
# the /mcp/{server} endpoint.
# url_rewrites:
# - name: per-server-mcp-compat
# match: "^/mcp-servers/([^/]+)/mcp$"
# rewrite: "/mcp/$1"

admin:
addr: "127.0.0.1:3001"
Expand Down
10 changes: 10 additions & 0 deletions config.managed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ proxy:
# 0 = no request-body cap (the default); set a value to bound
# per-request memory.
# request_body_limit_bytes: 0
# Entry-level URL rewriting (first matching rule wins; `match` runs on
# the raw, percent-encoded path; `rewrite` replaces the matched portion,
# $1 = capture group; the query string is preserved). Lets clients keep
# legacy URL shapes, e.g. per-server MCP paths served on the
# /mcp/{server} endpoint. When configuring through env vars only, set
# one JSON array: AISIX_PROXY__URL_REWRITES='[{"match":"...","rewrite":"..."}]'
# url_rewrites:
# - name: per-server-mcp-compat
# match: "^/mcp-servers/([^/]+)/mcp$"
# rewrite: "/mcp/$1"

admin:
# Bind to an unbindable port so even if managed mode somehow
Expand Down
1 change: 1 addition & 0 deletions crates/aisix-admin/src/playground_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ mod tests {
addr: "127.0.0.1:0".into(),
request_body_limit_bytes: 1_048_576,
real_ip: Default::default(),
url_rewrites: Vec::new(),
tls: None,
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/aisix-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ thiserror.workspace = true
anyhow.workspace = true
config.workspace = true
jsonschema.workspace = true
regex.workspace = true
schemars = { workspace = true, features = ["chrono"] }
# ApiKey::expires_at parses RFC 3339 timestamps for key-expiry
# enforcement in the proxy auth path (#933).
Expand Down
Loading
Loading