Merge pull request #133 from aledbf/fix-tcp-stream

Add TCP and UDP services removed in migration
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-01-19 09:06:03 -03:00 committed by GitHub
commit 0ed8260704
3 changed files with 51 additions and 2 deletions

View file

@ -433,7 +433,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 */}}