This commit is contained in:
Maximilian Hils 2021-06-17 20:02:32 +02:00
parent 34a620e57b
commit 5c0d700839
1 changed files with 6 additions and 2 deletions

View File

@ -115,9 +115,13 @@ class NextLayer:
# 2. Check for TLS # 2. Check for TLS
if client_tls: if client_tls:
# client tls usually requires a server tls layer as parent layer, except: # client tls usually requires a server tls layer as parent layer, except:
# - reverse proxy mode manages this itself.
# - a secure web proxy doesn't have a server part. # - a secure web proxy doesn't have a server part.
if s(modes.ReverseProxy) or s(modes.HttpProxy): # - reverse proxy mode manages this itself.
if (
s(modes.HttpProxy) or
s(modes.ReverseProxy) or
s(modes.ReverseProxy, layers.ServerTLSLayer)
):
return layers.ClientTLSLayer(context) return layers.ClientTLSLayer(context)
else: else:
# We already assign the next layer here os that ServerTLSLayer # We already assign the next layer here os that ServerTLSLayer