Nginx传递被阻止的推荐人

时间:2016-09-07 17:58:43

标签: django nginx referrer-spam

我一直都在接收僵尸垃圾邮件,因此我使用this阻止僵尸程序。

我非常惊讶,但我仍然收到来自Django的电子邮件,请求通过Nginx。

电子邮件数量从每小时数千个减少到每小时数十个,但来自相同的推荐人。

[Django] ERROR (EXTERNAL IP): Invalid HTTP_HOST header: 'www.elong.com'. You may need to add 'www.elong.com' to ALLOWED_HOSTS.

我的黑名单看起来:

map $http_referer $bad_referer {
    hostnames;

    default                             0;

    # Put regexes for undesired referers here
    "*.cn"                              1;
    "~bitauto.com"                      1;
    "~hunantv.com"                      1;
    ...
    "~com.cn"                           1;
    "~sogou.com"                        1;
    "~sina.com.cn"                      1;
    "~weibo.com"                        1;
    ...
    "~114la.com"                        1;
    "~quer.com"                         1;
    "~elong.com"                        1;
    "~yninfo.com"                       1;
    "~news.cn"                          1;
    "~126.com"                          1;
    "~pcpop.com"                        1;

}

如果我做卷曲一切正常:

curl --referer http://www.qunar.com my-host.com
curl: (52) Empty reply from server


curl --referer sina.com.cn my-host.com
curl: (52) Empty reply from server

0 个答案:

没有答案