title: Upstream sent too big header while reading response header from upstream in Keycloak
body: <p>I am trying to make an OIDC authentication/authorization against a keycloak server with an Android app I'm building.</p>
  
  <p>I am getting the following error, which is leading me to receive a 502 in my application:</p>
  
  <pre><code>2019/08/15 00:29:04 [error] 31921#31921: *64410338 upstream sent too big header while reading response header from upstream, client: 192.168.4.61, server: stage.example.com, request: "GET /auth/realms/master/protocol/openid-connect/auth?client_id=example-mobile-android&amp;redirect_uri=http%3A%2F%2Flocalhost%3A53978%2F%23%2Flogin&amp;state=a627edff-c1a2-43d3-8c6e-e5635bcc2252&amp;response_mode=fragment&amp;response_type=id_token%20token&amp;scope=openid&amp;nonce=69967773-36ba-49b2-8dd8-a31fd36f412b&amp;prompt=none HTTP/1.1", upstream: "http://192.168.4.147:8080/auth/realms/master/protocol/openid-connect/auth?client_id=example-mobile-android&amp;redirect_uri=http%3A%2F%2Flocalhost%3A53978%2F%23%2Flogin&amp;state=a627edff-c1a2-43d3-8c6e-e5635bcc2252&amp;response_mode=fragment&amp;response_type=id_token%20token&amp;scope=openid&amp;nonce=69967773-36ba-49b2-8dd8-a31fd36f412b&amp;prompt=none", host: "www.example.com", referrer: "http://localhost:53978/"
  </code></pre>
  
  <p>I have tried both this:</p>
  
  <pre><code>proxy_buffer_size          128k;
  proxy_buffers              4 256k;
  proxy_busy_buffers_size    256k;
  </code></pre>
  
  <p>as well as disabling the proxy buffer entirely.</p>
  
  <p>What could be going on? Do I expand my buffer further? Is there some other error I am not catching?</p>