From d04262069eb9ab0e069a6ff1d011a928a819dbb1 Mon Sep 17 00:00:00 2001 From: Joel Baldauf Date: Sat, 25 Jan 2025 19:49:54 +0100 Subject: [PATCH] fix proxy-host-object --- backend/schema/components/proxy-host-object.json | 12 ++++++++++++ backend/schema/paths/nginx/proxy-hosts/get.json | 2 ++ .../schema/paths/nginx/proxy-hosts/hostID/get.json | 2 ++ .../schema/paths/nginx/proxy-hosts/hostID/put.json | 8 ++++++++ backend/schema/paths/nginx/proxy-hosts/post.json | 8 ++++++++ test/cypress/e2e/api/ProxyHosts.cy.js | 2 ++ 6 files changed, 34 insertions(+) diff --git a/backend/schema/components/proxy-host-object.json b/backend/schema/components/proxy-host-object.json index 5098802..370e665 100644 --- a/backend/schema/components/proxy-host-object.json +++ b/backend/schema/components/proxy-host-object.json @@ -17,6 +17,8 @@ "advanced_config", "meta", "allow_websocket_upgrade", + "enable_proxy_protocol", + "load_balancer_ip", "http2_support", "forward_scheme", "enabled", @@ -78,6 +80,16 @@ "example": true, "type": "boolean" }, + "enable_proxy_protocol": { + "description": "Enable PROXY Protocol support", + "example": true, + "type": "boolean" + }, + "load_balancer_ip": { + "type": "string", + "minLength": 0, + "maxLength": 255 + }, "http2_support": { "$ref": "../common.json#/properties/http2_support" }, diff --git a/backend/schema/paths/nginx/proxy-hosts/get.json b/backend/schema/paths/nginx/proxy-hosts/get.json index 1d9f633..4e8a620 100644 --- a/backend/schema/paths/nginx/proxy-hosts/get.json +++ b/backend/schema/paths/nginx/proxy-hosts/get.json @@ -45,6 +45,8 @@ "nginx_err": null }, "allow_websocket_upgrade": false, + "enable_proxy_protocol": false, + "load_balancer_ip": "", "http2_support": false, "forward_scheme": "http", "enabled": true, diff --git a/backend/schema/paths/nginx/proxy-hosts/hostID/get.json b/backend/schema/paths/nginx/proxy-hosts/hostID/get.json index 5e10a9c..9380b62 100644 --- a/backend/schema/paths/nginx/proxy-hosts/hostID/get.json +++ b/backend/schema/paths/nginx/proxy-hosts/hostID/get.json @@ -45,6 +45,8 @@ "nginx_err": null }, "allow_websocket_upgrade": false, + "enable_proxy_protocol": false, + "load_balancer_ip": "", "http2_support": false, "forward_scheme": "http", "enabled": true, diff --git a/backend/schema/paths/nginx/proxy-hosts/hostID/put.json b/backend/schema/paths/nginx/proxy-hosts/hostID/put.json index 5cab6e7..e383d25 100644 --- a/backend/schema/paths/nginx/proxy-hosts/hostID/put.json +++ b/backend/schema/paths/nginx/proxy-hosts/hostID/put.json @@ -65,6 +65,12 @@ "allow_websocket_upgrade": { "$ref": "../../../../components/proxy-host-object.json#/properties/allow_websocket_upgrade" }, + "enable_proxy_protocol": { + "$ref": "../../../../components/proxy-host-object.json#/properties/enable_proxy_protocol" + }, + "load_balancer_ip": { + "$ref": "../../../../components/proxy-host-object.json#/properties/load_balancer_ip" + }, "access_list_id": { "$ref": "../../../../components/proxy-host-object.json#/properties/access_list_id" }, @@ -111,6 +117,8 @@ "nginx_err": null }, "allow_websocket_upgrade": false, + "enable_proxy_protocol": false, + "load_balancer_ip": "", "http2_support": false, "forward_scheme": "http", "enabled": true, diff --git a/backend/schema/paths/nginx/proxy-hosts/post.json b/backend/schema/paths/nginx/proxy-hosts/post.json index 85455fb..2a58737 100644 --- a/backend/schema/paths/nginx/proxy-hosts/post.json +++ b/backend/schema/paths/nginx/proxy-hosts/post.json @@ -53,6 +53,12 @@ "allow_websocket_upgrade": { "$ref": "../../../components/proxy-host-object.json#/properties/allow_websocket_upgrade" }, + "enable_proxy_protocol": { + "$ref": "../../../components/proxy-host-object.json#/properties/enable_proxy_protocol" + }, + "load_balancer_ip": { + "$ref": "../../../components/proxy-host-object.json#/properties/load_balancer_ip" + }, "access_list_id": { "$ref": "../../../components/proxy-host-object.json#/properties/access_list_id" }, @@ -96,6 +102,8 @@ "advanced_config": "", "meta": {}, "allow_websocket_upgrade": false, + "enable_proxy_protocol": false, + "load_balancer_ip": "", "http2_support": false, "forward_scheme": "http", "enabled": true, diff --git a/test/cypress/e2e/api/ProxyHosts.cy.js b/test/cypress/e2e/api/ProxyHosts.cy.js index 5bc6458..6ee168b 100644 --- a/test/cypress/e2e/api/ProxyHosts.cy.js +++ b/test/cypress/e2e/api/ProxyHosts.cy.js @@ -29,6 +29,8 @@ describe('Proxy Hosts endpoints', () => { block_exploits: false, caching_enabled: false, allow_websocket_upgrade: false, + enable_proxy_protocol: false, + load_balancer_ip: '', http2_support: false, hsts_enabled: false, hsts_subdomains: false,