我的网络应用程序有以下nginx配置:
server {
listen 80;
server_name www.stage.app.net;
root /var/local/app/current/public;
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|ttf|woff|svg)$
{
#oboe_tracing_mode never;
expires 1y;
}
location ~* /trackback/ {
deny all;
}
passenger_enabled on;
passenger_friendly_error_pages on;
rails_env staging;
include /var/local/app/current/config/nginx/block_malicious.inc;
include /var/local/app/current/config/nginx/rewrite_projects.inc;
}
我正在尝试屏蔽POST
以下网址http://app.lan/p/tableau-wordpress-plugin/commits/trackback
从我的nginx读数中,这应该正确阻止向此网址发送任何内容。但是,当我向Postman发出Post
请求时,错误会报告为errbit。这不是正确的配置吗?
我试过
location ~* trackback {}
location /trackback/ {}
location /trackback {}
并且这些配置似乎都不起作用。有人可以帮我解决这个问题吗?