title: grpc-web behind double nginx
body: <p>I've got grpc-web running in react. This communicates through NGINX. This NGINX communicates with a different NGINX server, running in docker, which communicates with my rust tonic http1 server.</p>
  <p>With one NGINX server the following config worked:</p>
  <pre><code>        location /my.EndPoint/ {
              add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
              add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Transfer-Encoding,Custom-Header-1,X-Accept-Content-Transfer-Encoding,X-Accept-Response-Streaming,X-User-Agent,X-Grpc-Web,content-type,snet-current-block-number,snet-free-call-user-id,snet-payment-channel-signature-bin,snet-payment-type,x-grpc-web';
              add_header 'Access-Control-Max-Age' 1728000;
              add_header 'Content-Type' 'text/plain charset=UTF-8';
              add_header 'Content-Length' 0;
              proxy_pass http://hostname:50051/my.EndPoint/;
          }
  </code></pre>
  <p>When I put another NGINX in front with the following config:</p>
  <pre><code>  location / {
      proxy_pass http://192.168.0.xxx:81;
      client_max_body_size 5G;
    }
  </code></pre>
  <p>it stops working. I don't get any data back. The server does receive the request, but after that the request does not come back to grpc-web.</p>
  <p>How do I route grpc-web through two instances of NGINX?</p>