瀏覽代碼

Prevent activating nginx config after editing disabled proxy host

Orko Garai 4 年之前
父節點
當前提交
7e7032c051
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      backend/internal/proxy-host.js

+ 4 - 0
backend/internal/proxy-host.js

@@ -189,6 +189,10 @@ const internalProxyHost = {
 					expand: ['owner', 'certificate', 'access_list.[clients,items]']
 				})
 					.then((row) => {
+						if (!row.enabled) {
+							// No need to add nginx config if host is disabled
+							return row;
+						}
 						// Configure nginx
 						return internalNginx.configure(proxyHostModel, 'proxy_host', row)
 							.then((new_meta) => {