Force nginx instantly close the connection

How to allow nginx to instantly close tcp connection after query execution?

+7
source share
2 answers

I found a solution:

location /ip/ { keepalive_timeout 0; } 
+8
source

The connection is maintained between the server and the browser due to exchanges between them.

You can disable Keep Alive behavior for a specific user agent: see nginx manual

 keepalive_disable ua 

You might be tricking your browser into having a predefined user agent, supporting it only for your specific needs.

+1
source

All Articles