mirror of
https://github.com/nprasad2077/NBA_Go.git
synced 2026-09-22 14:05:13 +00:00
blocks
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user