mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
fix(Issue: 2111) Apply loadbalancing for UDP (#2247)
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
# UPSTREAM SERVERS
|
||||
{% for upstream in helpers.toList('OPNsense.Nginx.upstream') %}
|
||||
upstream upstream{{ upstream['@uuid'].replace('-','') }} {
|
||||
hash $remote_addr consistent;
|
||||
{% if upstream.load_balancing_algorithm is defined and upstream.load_balancing_algorithm != '' %}
|
||||
{% if upstream.load_balancing_algorithm == 'ip_hash' %}
|
||||
hash $remote_addr consistent;
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for upstream_serveruuid in upstream.serverentries.split(',') %}
|
||||
{% set upstream_server = helpers.getUUID(upstream_serveruuid) %}
|
||||
server {% if ':' in upstream_server.server %}[{% endif %}{{ upstream_server.server }}{% if ':' in upstream_server.server %}]{% endif
|
||||
|
||||
Reference in New Issue
Block a user