How to block POST requests?

Rafał Zawadzki rafal.zawadzki at sensisoft.com
Wed May 14 02:44:22 MSD 2008


Tuesday 13 May 2008 23:26:40 Rt Ibmer napisał(a):
> My nginx server should never receive POST requests of any time (only HEAD
> and GET). How can I set up the configuration so that it will return
> forbidden (or otherwise just drop the request completely) if someone tries
> to POST data to my server? I thought I saw this somewhere a while back, but
> just checked the docs and mailing list archive and can't locate the info.
> Thanks!

Try:

limit_except  GET HEAD {
    deny   all;
}

and give any feedback.

P.S.

http://wiki.codemongers.com/NginxHttpCoreModule#limit_except

Cheers,

-- 
Rafał Zawadzki [ System Architect ]
  RHCE Red Hat Certified Engineer
tel 		+48 22 8430101
mobile       	+48 600 883 759
skype id     	blvszcz
jabber id     	bluszcz at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://nginx.org/pipermail/nginx/attachments/20080514/7fc5c04b/attachment.pgp>


More information about the nginx mailing list