revprox only if eth0 exists (for tls server)

This commit is contained in:
egarette@silique.fr 2023-03-02 21:40:33 +01:00
parent 5b29e1630b
commit 80484b0a32
2 changed files with 9 additions and 9 deletions

View file

@ -20,7 +20,7 @@
</variable> </variable>
<variable name="revprox_client_max_body_size" description="Taille maximum du corps" supplier="ReverseProxy:max_body_size"/> <variable name="revprox_client_max_body_size" description="Taille maximum du corps" supplier="ReverseProxy:max_body_size"/>
<variable name="revprox_client_local_location" type="filename" hidden='True'/> <variable name="revprox_client_local_location" type="filename" hidden='True'/>
<variable name="revprox_client_web_address" type="web_address" hidden='True' supplier="ReverseProxy:url"/> <variable name="revprox_client_web_address" type="web_address" hidden='True' supplier="ReverseProxy:url" mandatory="True"/>
<variable name="revprox_http" type="boolean" hidden='True' supplier="ReverseProxy:http"> <variable name="revprox_http" type="boolean" hidden='True' supplier="ReverseProxy:http">
<value>False</value> <value>False</value>
</variable> </variable>
@ -43,10 +43,10 @@
<target>revprox_client_server_ip</target> <target>revprox_client_server_ip</target>
</fill> </fill>
<fill name="calc_web_address"> <fill name="calc_web_address">
<param type="variable">domain_name_eth0</param> <param type="variable" name="domain_name" optional="True">domain_name_eth0</param>
<param type="variable">revprox_client_port</param> <param type="variable" name="port">revprox_client_port</param>
<param type="variable">revprox_client_local_location</param> <param type="variable" name="local_location">revprox_client_local_location</param>
<param type="variable">revprox_client_http</param> <param type="variable" name="http">revprox_client_http</param>
<target>revprox_client_web_address</target> <target>revprox_client_web_address</target>
</fill> </fill>
</constraints> </constraints>

View file

@ -1,7 +1,7 @@
def calc_web_address(domain_name: str, def calc_web_address(domain_name: str=None,
port: str, port: str=None,
local_location: str, local_location: str=None,
http: bool, http: bool=None,
) -> str: ) -> str:
if not domain_name or not port: if not domain_name or not port:
return return