使用http://在Nginx中过滤请求

有没有办法过滤看起来像“GET http://example.com ”的请求,但不过滤一个看起来像“GET /index.html”? 换句话说,可以在“If”子句中使用的Nginxvariables是什么?

问这个问题的原因是,我在我的网站上看到多个请求,看起来像:“GET http://somesite.com/proxyheader ”从search免费代理服务器的用户。

这在0.8.41中适用于我:

if ($request ~* "^[^ ]+[ ]+[^:]+://" ) { return 400; } 

你有没有在nginxconfiguration中检查variables?

链接: 链接文本

你能告诉我们你的日志文件的摘录吗? 是http:// somesite …一个参数( http://example.com/http://seomsite ..。 )?

问候,本。