Full request line variable

Igor Sysoev is at rambler-co.ru
Sat Sep 19 09:46:03 MSD 2009


On Sat, Sep 19, 2009 at 02:02:02AM +0000, 2947779 at deadaddress.com wrote:

> What 0.7.62 variable gives the full request line?

$request_uri

> We need to defeat proxying attempts.
> Here's what we find in access logs:
> 
> Good:   GET /valid HTTP/1.1
> Evil:   GET http://www.externaldomain.com/ HTTP/1.1
> 
> The proxy attempt should get a 444, but right now
> redirects to our home page.  We want to use 444
> to conserve CPU and bandwidth.  We use ^http
> but it fails:
> 
> if ($request_uri ~* (^http.*|.*proxy.*) ) {
>   return 444;
> }

You should use default server.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list