Fix: create location support for proxy pass

This commit is contained in:
GW_MC
2026-01-12 11:41:55 +08:00
parent 7ae76f622c
commit b4a36dbe4c
3 changed files with 335 additions and 19 deletions

View File

@@ -895,13 +895,41 @@
}
},
"CreateLocationRequestBody": {
"oneOf": [
{
"$ref": "#/components/schemas/CreateLocationRequestBodyByUpstreamId"
},
{
"$ref": "#/components/schemas/CreateLocationRequestBodyByProxyPass"
}
]
},
"CreateLocationRequestBodyByProxyPass": {
"type": "object",
"required": [
"path",
"match_type",
"order"
"order",
"proxy_pass_protocol",
"proxy_pass_host",
"proxy_pass_port"
],
"properties": {
"allowed_methods": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"custom_config": {
"type": [
"string",
"null"
]
},
"match_type": {
"type": "string"
},
@@ -912,11 +940,66 @@
"path": {
"type": "string"
},
"upstream_id": {
"preserve_host_header": {
"type": [
"boolean",
"null"
]
},
"proxy_pass_host": {
"type": "string"
},
"proxy_pass_port": {
"type": "integer",
"format": "int64"
},
"proxy_pass_protocol": {
"type": "string"
}
}
},
"CreateLocationRequestBodyByUpstreamId": {
"type": "object",
"required": [
"path",
"match_type",
"order",
"upstream_id"
],
"properties": {
"allowed_methods": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"custom_config": {
"type": [
"string",
"null"
],
]
},
"match_type": {
"type": "string"
},
"order": {
"type": "integer",
"format": "int64"
},
"path": {
"type": "string"
},
"preserve_host_header": {
"type": [
"boolean",
"null"
]
},
"upstream_id": {
"type": "string",
"format": "uuid"
}
}