From fe2a5d2c59fb7d33505df052c152a87368934cfa Mon Sep 17 00:00:00 2001 From: quietsy Date: Wed, 26 Jan 2022 19:17:01 +0200 Subject: [PATCH] Add support for auto-proxy --- root/dashboard/swag-proxies.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/root/dashboard/swag-proxies.py b/root/dashboard/swag-proxies.py index 0a0bf79..d24d9c9 100644 --- a/root/dashboard/swag-proxies.py +++ b/root/dashboard/swag-proxies.py @@ -11,6 +11,8 @@ import urllib3 def find_apps(): apps = {} file_paths = glob.glob("/config/nginx/**/*", recursive=True) + auto_confs = glob.glob("/etc/nginx/http.d/*", recursive=True) + file_paths.extend(auto_confs) for file_path in file_paths: if not os.path.isfile(file_path): continue @@ -23,6 +25,7 @@ def find_apps(): if app not in apps: apps[app] = set() if file_path.startswith("/config/nginx/site-confs/") or file_path.endswith(".conf"): + file_path = "auto-proxy" if file_path.startswith("/etc/nginx/http.d/") else file_path apps[app].add(file_path) return apps