# Pastebin t3sj0mVT {% macro frontend_macro(constants, listener, lb_vip_address) %} frontend {{ listener.id }} {% if (listener.protocol.lower() == constants.PROTOCOL_TERMINATED_HTTPS.lower() or listener.protocol.lower() == constants.PROTOCOL_HTTP.lower()) %} option httplog {% else %} option tcplog {% endif %} {% if listener.connection_limit is defined %} maxconn {{ listener.connection_limit }} {% endif %} {% if (listener.protocol.lower() == constants.PROTOCOL_TERMINATED_HTTPS.lower()) %} redirect scheme https if !{ ssl_fc } {% endif %} {{ bind_macro(constants, listener, lb_vip_address)|trim() }} mode {{ listener.protocol_mode }} {% for l7policy in listener.l7policies if (l7policy.enabled and l7policy.l7rules|length > 0) %} {{- l7policy_macro(constants, l7policy) -}} {% endfor %} {% if listener.default_pool and listener.default_pool.enabled %} default_backend {{ listener.default_pool.id }} {% endif %} timeout client {{ listener.timeout_client_data }} {% if listener.timeout_tcp_inspect %} tcp-request inspect-delay {{ listener.timeout_tcp_inspect }} {% endif %} {% endmacro %}