This commit is contained in:
Mateusz Gruszczyński committed 2026-11-23 11:07:13 +01:00
1 parent 27b640a0df
commit aa27866531
46 files changed
+3368 -189

No files matched your search

+183 -4
View File
@@ -290,7 +290,34 @@
},
"backend_id": {
"type": "string",
"nullable": true
"nullable": true,
"description": "Pin one Vhost backend. Cannot be combined with backend_ids or load_balancing."
},
"backend_ids": {
"type": "array",
"maxItems": 64,
"uniqueItems": true,
"items": {
"type": "string"
},
"description": "Backend group of this location (Vhost backend ids). Empty: the Vhost pool. Members with pool_eligible=false serve only locations that list them."
},
"load_balancing": {
"allOf": [
{
"$ref": "#/components/schemas/LocationBalancing"
}
],
"nullable": true,
"description": "Own algorithm/hash/affinity for this location; null inherits the Vhost settings."
},
"conditions": {
"type": "array",
"maxItems": 16,
"items": {
"$ref": "#/components/schemas/RouteCondition"
},
"description": "Extra request conditions; all must hold (AND). A location whose conditions fail is skipped and the next candidate is tried. Responses of conditional locations are never cached (cache must be null or false)."
},
"enabled": {
"type": "boolean"
@@ -328,10 +355,11 @@
"prefix_priority",
"exact",
"regex",
"regex_insensitive"
"regex_insensitive",
"any"
],
"default": "prefix",
"description": "Nginx-style location matching: prefix, priority prefix (^~), exact (=), regex (~), or case-insensitive regex (~*)."
"description": "`any` matches every path: a whole-host rule selected only by its `conditions` (required), evaluated with regular expressions in list order."
},
"rewrite": {
"type": "object",
@@ -5204,9 +5232,12 @@
"least_connections",
"least_traffic",
"adaptive",
"random",
"hash",
"ip_hash"
],
"default": "least_connections"
"default": "least_connections",
"description": "`hash` uses the consistent (weighted rendezvous) hash configured in `hash`; `random` picks the less loaded of two random members; `ip_hash` equals `hash` with source `ip`."
},
"health_check": {
"$ref": "#/components/schemas/DockerHealthCheck",
@@ -5330,6 +5361,9 @@
"minimum": 0,
"maximum": 300,
"default": 10
},
"hash": {
"$ref": "#/components/schemas/HashSettings"
}
}
},
@@ -9006,6 +9040,151 @@
"description": "Resolved effective cache settings; only in full Cache responses."
}
}
},
"HashSettings": {
"type": "object",
"additionalProperties": false,
"description": "Key of the `hash` algorithm. Hashing is always consistent: removing or ejecting a member only moves its own keys. Omitted when all fields have their defaults.",
"properties": {
"source": {
"type": "string",
"enum": [
"path",
"uri",
"host",
"ip",
"header",
"cookie",
"query"
],
"default": "path",
"description": "path: request path without query as received from the client; uri: path and query; host: host name without port; ip: client address; header/cookie/query: value named by `name`."
},
"name": {
"type": "string",
"maxLength": 128,
"description": "Header, cookie or query parameter name; required for header/cookie/query and rejected for other sources."
},
"path_depth": {
"type": "integer",
"minimum": 0,
"maximum": 32,
"default": 0,
"description": "For path/uri: number of leading directories hashed; 0 hashes the whole path."
},
"ignore_case": {
"type": "boolean",
"default": false
},
"balance_factor": {
"type": "integer",
"minimum": 0,
"maximum": 1000,
"default": 0,
"description": "Bounded load in percent of the weighted average (HAProxy hash-balance-factor). 0 disables; otherwise 101..1000."
},
"fallback": {
"type": "string",
"enum": [
"round_robin",
"least_connections",
"least_traffic",
"adaptive",
"random"
],
"default": "round_robin",
"description": "Algorithm for requests without a key value."
}
}
},
"LocationBalancing": {
"type": "object",
"additionalProperties": false,
"description": "Location-specific balancing over the location's backend group (or the whole Vhost pool). Members, health and limits are shared with the Vhost pool.",
"properties": {
"algorithm": {
"type": "string",
"enum": [
"round_robin",
"least_connections",
"least_traffic",
"adaptive",
"random",
"hash",
"ip_hash"
],
"default": "hash"
},
"hash": {
"$ref": "#/components/schemas/HashSettings"
},
"sticky": {
"type": "string",
"enum": [
"off",
"cookie",
"ip_hash"
],
"default": "off",
"description": "Location affinity. The cookie is named `<vhost affinity cookie>__<location id>`."
}
}
},
"RouteCondition": {
"type": "object",
"additionalProperties": false,
"description": "One request condition of a location. Matches when any of `values` matches; `negate` inverts it.",
"properties": {
"source": {
"type": "string",
"enum": [
"header",
"cookie",
"query",
"method",
"ip",
"host",
"country"
],
"default": "header"
},
"name": {
"type": "string",
"maxLength": 128,
"description": "Header, cookie or query parameter name (required for those sources, rejected otherwise)."
},
"operator": {
"type": "string",
"enum": [
"equals",
"exists",
"prefix",
"suffix",
"contains",
"regex",
"cidr"
],
"default": "equals",
"description": "`cidr` only for `ip` (and the only operator for it); `method` and `country` use `equals`; `exists` takes no values and is not available for `host`."
},
"values": {
"type": "array",
"maxItems": 64,
"items": {
"type": "string",
"maxLength": 1024
}
},
"negate": {
"type": "boolean",
"default": false
},
"ignore_case": {
"type": "boolean",
"default": false,
"description": "Case-insensitive comparison for header, cookie and query values. Host, method and country always compare case-insensitively."
}
}
}
}
},