Create or Update Website Reverse-Proxy Rule
upsert_website_proxyCreate or edit a website's reverse-proxy location rule, with sanitized upstream URL, match path, and headers to block Nginx directive injection.
Instructions
Create (operate: "create") or edit (operate: "edit") a reverse-proxy location rule on a website. Sanitizes upstream URL, match path, and headers against Nginx directive injection.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"website_id": "<website_id>",
"operate": "<operate>",
"name": "<name>",
"proxy_pass": "<proxy_pass>"
},
"name": "upsert_website_proxy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sni | No | Enable TLS SNI when proxying to an HTTPS upstream. | |
| name | Yes | Unique proxy rule name on this website (e.g. "root" or "api"). | |
| cache | No | Enable proxy response caching. | |
| match | No | Location match path starting with "/" (defaults to "/"). | / |
| enable | No | Whether the proxy rule is active. | |
| nodeId | No | Target node ID: "local" for the Main Node, or a numeric string ID (e.g. "3") from list_nodes. | local |
| operate | Yes | Operation mode: "create" a new rule or "edit" an existing named rule. | |
| modifier | No | Nginx location modifier (defaults to "^~"). | ^~ |
| replaces | No | Optional sub_filter string replacements map. | |
| cache_time | No | Cache duration when `cache` is true. | |
| cache_unit | No | Cache duration unit. | |
| proxy_host | No | Upstream Host header value (defaults to "$host"). | $host |
| proxy_pass | Yes | Upstream target URL (e.g. "http://127.0.0.1:3000" or "https://backend.example.com"). | |
| ssl_verify | No | Verify upstream TLS certificate when using HTTPS proxy_pass. | |
| website_id | Yes | Numeric website ID. | |
| proxy_ssl_name | No | Optional TLS SNI server name when `sni` is true. |