diff --git a/salt/nginx/etc/nginx.conf b/salt/nginx/etc/nginx.conf index f0308b868..55995c368 100644 --- a/salt/nginx/etc/nginx.conf +++ b/salt/nginx/etc/nginx.conf @@ -70,6 +70,17 @@ http { grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffering off; } + + location ~ ^/kolide.launcher.QueryTarget/GetTargets$ { + {%- if role == 'fleet' %} + grpc_pass grpcs://{{ main_ip }}:8080; + {%- else %} + grpc_pass grpcs://{{ manager_ip }}:8080; + {%- endif %} + grpc_set_header Host $host; + grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_buffering off; + } } {%- endif %}