mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-17 02:23:15 +01:00
Prevent invalid Caddy config from app gateway applications
This commit is contained in:
@@ -145,7 +145,8 @@ def build_caddyfile(apps, auth_policies, routes):
|
|||||||
for app in apps:
|
for app in apps:
|
||||||
hosts = app.get("hosts", [])
|
hosts = app.get("hosts", [])
|
||||||
upstream = app.get("upstream", "")
|
upstream = app.get("upstream", "")
|
||||||
allow_invalid_cert = app.get("allow_invalid_cert", False)
|
# tls_insecure_skip_verify is only valid for https upstreams
|
||||||
|
allow_invalid_cert = app.get("allow_invalid_cert", False) and upstream.startswith("https://")
|
||||||
static_routes = app.get("static_routes", [])
|
static_routes = app.get("static_routes", [])
|
||||||
app_id = app.get("id", "")
|
app_id = app.get("id", "")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user