mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
blocks
This commit is contained in:
@@ -33,3 +33,4 @@ data/nba.db
|
|||||||
docs/restore_dump_remote.md
|
docs/restore_dump_remote.md
|
||||||
./docs/restore_dump_remote.md
|
./docs/restore_dump_remote.md
|
||||||
docs/notes/conversation_1.md
|
docs/notes/conversation_1.md
|
||||||
|
docs/notes/conversation_2.md
|
||||||
@@ -7,6 +7,12 @@ events {
|
|||||||
http {
|
http {
|
||||||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=api_cache:10m max_size=100m inactive=5m;
|
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 {
|
upstream go_backend {
|
||||||
server api1:5000;
|
server api1:5000;
|
||||||
server api2:5000;
|
server api2:5000;
|
||||||
@@ -19,6 +25,10 @@ http {
|
|||||||
access_log /dev/stdout;
|
access_log /dev/stdout;
|
||||||
error_log /dev/stderr;
|
error_log /dev/stderr;
|
||||||
|
|
||||||
|
if ($blocked_referer) {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_cache api_cache;
|
proxy_cache api_cache;
|
||||||
proxy_cache_valid 200 30s;
|
proxy_cache_valid 200 30s;
|
||||||
|
|||||||
Reference in New Issue
Block a user