varnish reconfig

This commit is contained in:
Mateusz Gruszczyński
2025-09-25 09:17:51 +02:00
parent ee59c3e561
commit 0286ee351e

View File

@@ -17,8 +17,8 @@ acl purge {
# ===== RECV =====
sub vcl_recv {
# RATE LIMIT: 100 żądań / 10s, blokada 60s
if (vsthrottle.is_denied(client.identity, 100, 10s, 60s)) {
# RATE LIMIT: 50 żądań / 10s, blokada 60s
if (vsthrottle.is_denied(client.identity, 50, 10s, 60s)) {
return (synth(429, "Too Many Requests"));
}
@@ -166,10 +166,12 @@ sub vcl_backend_response {
sub vcl_deliver {
if (obj.uncacheable) {
set resp.http.X-Cache = "PASS";
unset resp.http.Age;
} else if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
unset resp.http.Age;
}
unset resp.http.Via;