Add TCP and UDP services removed in migration

This commit is contained in:
Manuel de Brito Fontes 2017-01-08 21:31:16 -03:00
parent 28c67257e3
commit ba98383c2d
3 changed files with 51 additions and 2 deletions

View file

@ -430,7 +430,27 @@ stream {
proxy_pass $stream_upstream;
ssl_preread on;
}
{{ buildStreamUpstreams "tcp" $backends .TCPBackends }}
{{ buildStreamUpstreams "udp" $backends .UDPBackends }}
# TCP services
{{ range $i, $tcpServer := .TCPBackends }}
server {
listen {{ $tcpServer.Path }};
proxy_pass tcp-{{ $tcpServer.Backend }};
}
{{ end }}
# UDP services
{{ range $i, $udpServer := .UDPBackends }}
server {
listen {{ $udpServer.Path }} udp;
proxy_responses 1;
proxy_pass udp-{{ $udpServer.Backend }};
}
{{ end }}
}
{{/* definition of templates to avoid repetitions */}}