我有以下nginx.conf:
('foobar', 'foo')
此配置不会允许将有效负载包含在GET请求中-我的印象是HTTP甚至都不允许这样的有效负载,但是我有这个要求在起作用-显然ElasticSearch接受带有GET动词的有效载荷。
我相信请求正文被缓冲为worker_processes 4;
events { worker_connections 1024; }
http {
sendfile off;
upstream ES {
server 172.xx.23.121:9200;
server 172.xx.25.138:9200;
server 172.xx.25.51:9200;
}
server {
listen 80;
add_header Allow "GET, HEAD" always;
if ( $request_method !~ ^(GET|HEAD)$ ) {
return 405;
}
location / {
proxy_pass http://ES;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
,但是如何确保它被转发了?