File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ DISABLE_HTTPS="${DISABLE_HTTPS:-false}"
3030NGINX_WORKERS=" ${NGINX_WORKERS:- 2} "
3131NGINX_PROXY_BUFFERING=" ${NGINX_PROXY_BUFFERING:- off} "
3232NGINX_MAX_UPLOAD_SIZE=" ${NGINX_MAX_UPLOAD_SIZE:- 80m} "
33+ TRUST_GATEWAY_IP=" ${TRUST_GATEWAY_IP:- False} "
3334# Zulip certificate parameters
3435SSL_CERTIFICATE_GENERATION=" ${SSL_CERTIFICATE_GENERATION: self-signed} "
3536# Zulip related settings
@@ -141,6 +142,11 @@ puppetConfiguration() {
141142 crudini --set /etc/zulip/zulip.conf application_server queue_workers_multiprocess false
142143 fi
143144
145+ if [ " $TRUST_GATEWAY_IP " == " True" ] || [ " $TRUST_GATEWAY_IP " == " true" ]; then
146+ GATEWAY_IP=$( ip route | grep default | awk ' {print $3}' )
147+ echo " Trusting local network gateway $GATEWAY_IP "
148+ LOADBALANCER_IPS=" ${LOADBALANCER_IPS: +$LOADBALANCER_IPS ,} $GATEWAY_IP "
149+ fi
144150 if [ -n " $LOADBALANCER_IPS " ]; then
145151 echo " Setting IPs for load balancer"
146152 crudini --set /etc/zulip/zulip.conf loadbalancer ips " ${LOADBALANCER_IPS} "
You can’t perform that action at this time.
0 commit comments