How to prevent unwanted routes in nginx, for requests routed to my rails application.
Started GET "/w00tw00t.at.blackhats.romanian.anti-sec:)" for 125.218.121.25 at 2014-01-13 02:04:28 +0000
Processing by RoutingErrorsController#routing_error as
Parameters: {"path"=>"w00tw00t.at.blackhats.romanian"}
Completed in 0.8ms
Use the location directive:
location ~ /myUnavailableRoute {
deny all;
}
You can use regular expressions to block all routes matching a certain pattern (or to white-list only allowed routes if that makes more sense). There are some good examples in the nginx docs: http://nginx.org/en/docs/beginners_guide.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With