Re: How to block POST requests?

Wow Calomel!! What a fantastic resource. You know, I recall coming
across your site several weeks ago when first getting up to speed with
nginx and it was interesting yet a bit over my head at the time. Now it
is really invaluable, so that you so much for putting that together.

I am running on Fedora 8 core and am looking for a good resource that
explains how to use iptables to lock down a site to expected usage (rate
limits, etc). I see you have some links on the subject but didn’t see
anything specific to iptables. Can you (or anyone else) recommend a
good resource for this?

Thanks again!

----- Original Message ----
From: Calomel [email protected]
To: [email protected]
Sent: Tuesday, May 13, 2008 9:05:01 PM
Subject: Re: How to block POST requests?

You can also use regular expressions for a bit more flexibility. This
way you can explicitly accept only the request methods you allow and
return the error code of your choosing.

Only allow GET and HEAD request methods

  if ($request_method !~ ^(GET|HEAD)$ ) {
     return 444;
  }

Nginx “How to” Fast and Secure webserver
https://calomel.org/nginx.html


Calomel @ https://calomel.org
Open Source Research and Reference

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs