basic spammer protection w/ nginx?

0 views
Skip to first unread message

Vince Wadhwani

unread,
Aug 1, 2008, 12:06:52 AM8/1/08
to rubyonrails...@googlegroups.com
Does anyone have any recommendations for some basic rules I can apply
to my nginx.conf file to prevent spambots and the like? I saw a post
with some Apache/PHP specific stuff but I'm not sure how to convert it
for Nginx/Rails:

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yourdomain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]

It seems a spammer is scraping the authenticity token from my site so
I need to find another way..

Thanks in advance,
Vince

Reply all
Reply to author
Forward
0 new messages