From de922fd7e41355f7702950bfa6c4ce15efe4abbd Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Wed, 19 Jun 2024 15:35:44 +0200 Subject: [PATCH] better (cherry picked from commit 89ff26660f5bf0b54cdda0d519934f4d96f27be8) --- core/nginx/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/nginx/config.py b/core/nginx/config.py index 0044772e..4a381c2c 100755 --- a/core/nginx/config.py +++ b/core/nginx/config.py @@ -76,7 +76,7 @@ PROTO_ALL_BUT_HTTP=PROTO_MAIL.copy() PROTO_ALL_BUT_HTTP.extend(['443']) PROTO_ALL=PROTO_ALL_BUT_HTTP.copy() PROTO_ALL.extend(['80']) -for item in args.get('PROXY_PROTOCOL', None).split(','): +for item in args.get('PROXY_PROTOCOL', '').split(','): if item.isdigit(): args[f'PROXY_PROTOCOL_{item}']=True elif item == 'mail': @@ -85,6 +85,8 @@ for item in args.get('PROXY_PROTOCOL', None).split(','): for p in PROTO_ALL_BUT_HTTP: args[f'PROXY_PROTOCOL_{p}']=True elif item == 'all': for p in PROTO_ALL: args[f'PROXY_PROTOCOL_{p}']=True + elif item == '': + pass else: log.error(f'Not sure what to do with {item} in PROXY_PROTOCOL ({args.get("PROXY_PROTOCOL")})')