add tracker filter by lua

This commit is contained in:
xiaomlove
2025-05-01 21:42:31 +07:00
parent 3c3d395887
commit e5937d8ab3
6 changed files with 218 additions and 12 deletions
+12 -8
View File
@@ -14,12 +14,6 @@ server {
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files $uri $uri/ /nexus.php?$query_string;
}
@@ -29,6 +23,18 @@ server {
try_files $uri $uri/ /nexus.php$is_args$args;
}
location = /announce.php {
access_by_lua_block {
local filter = require("tracker_filter")
filter()
}
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_ID $request_id;
}
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
@@ -37,6 +43,4 @@ server {
fastcgi_param REQUEST_ID $request_id;
}
error_log /dev/stderr;
access_log /dev/stdout;
}
@@ -11,7 +11,4 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
error_log /dev/stderr;
access_log /dev/stdout;
}