Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Commit a729799

Browse files
fix(nginx): Enable builder PROXY PROTOCOL support
If proxy protocol is enabled on an AWS ELB in kubernetes using the `service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'` annotation on the load balancer service, it will enable PROXY PROTOCOL on all ports forwarded by the ELB, which means the builder proxy on port 2222 also needs to use enable proxy_protocol on its listen directive. There is currently no way to configure PROXY PROTOCOL per port on AWS using kubenetes service annotation and it doesn't really make sense to enable proxy protocol only for port 80 and 443 anyways, so this fix uses the same configuration setting as is used for http and https. This fixes #255.
1 parent 5a6b004 commit a729799

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nginx/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ http {
247247
248248
{{ if $routerConfig.BuilderConfig }}{{ $builderConfig := $routerConfig.BuilderConfig }}stream {
249249
server {
250-
listen 2222;
250+
listen 2222 {{ if $routerConfig.UseProxyProtocol }}proxy_protocol{{ end }};
251251
proxy_connect_timeout {{ $builderConfig.ConnectTimeout }};
252252
proxy_timeout {{ $builderConfig.TCPTimeout }};
253253
proxy_pass {{$builderConfig.ServiceIP}}:2222;

0 commit comments

Comments
 (0)