问题原文
原帖链接 · logut · CC BY-SA 4.0
Using nginx as HTTP reverse proxy for Apache with PHP backend (I need .htaccess flexibility for webmasters). Seeing http/1.0 used in Apache logs made me look up on how to enable keep-alive connection.
Upon my search I found this blog post from Nginx https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/#no-keepalives
By default, NGINX opens a new connection to an upstream (backend) server for every new incoming request. This is safe but inefficient,[...]
If default behavior is safe, what are the risks of enabling upstream keepalive ?
已采纳解答
原帖链接 · user195311 · CC BY-SA 4.0
Proxying a connection with keepalive is considered a risk because of HTTP desynchronization attacks / request smuggling. This occurs when the backend doesn't split different client requests in the exact same way as the frontend. Closing the connection after each request is the "safe" option, since this clearly delineates when the current request has ended.
See https://book.hacktricks.xyz/pentesting-web/http-request-smuggling for more information.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
