From 81b55247f3b1ccaf1b07ac2f2f4c92198164153a Mon Sep 17 00:00:00 2001 From: Ravi Prasad Date: Sat, 16 May 2026 05:23:01 -0500 Subject: [PATCH] blocks --- .gitignore | 1 + nginx/nginx.conf | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index b7b9994..d7eaca8 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ data/nba.db docs/restore_dump_remote.md ./docs/restore_dump_remote.md docs/notes/conversation_1.md +docs/notes/conversation_2.md \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 134b2b7..241cec0 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -7,6 +7,12 @@ events { http { proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=api_cache:10m max_size=100m inactive=5m; + map $http_referer $blocked_referer { + default 0; + "~*nbasalarymodel\.xyz" 1; + "~*kacpertheater\.github\.io" 1; + } + upstream go_backend { server api1:5000; server api2:5000; @@ -19,6 +25,10 @@ http { access_log /dev/stdout; error_log /dev/stderr; + if ($blocked_referer) { + return 403; + } + location /api/ { proxy_cache api_cache; proxy_cache_valid 200 30s;