Allow and Deny IP's

Kaushal Shriyan kaushalshriyan at
Mon Feb 5 18:26:04 UTC 2018


When i run this curl call -> curl -X GET -H
'cache-control: no-cache' -H 'postman-token:
2494a4a7-6791-2426-cedf-d0bcaa1cd90a' -H 'x-forwarded-for:'

Ideally the request should not be allowed and the access log should report
403 instead of 200
I get 200 OK in the access.log

  location / {
        proxy_set_header X-Forwarded-For $remote_addr;
        deny all;
        error_page 404 /404.html;
            location = /40x.html {

Please let me know if i am missing anything.

Best Regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list