Refine varnish

This commit is contained in:
weidenwiesel
2026-02-13 15:16:09 +01:00
parent a82f24767e
commit 9bc446b9d9
+3 -2
View File
@@ -1,7 +1,7 @@
vcl 4.1;
backend invidious_service {
.host = "192.42.6.2";
.host = invidious;
.port = "3000";
.connect_timeout = 5s;
.first_byte_timeout = 5s;
@@ -29,12 +29,13 @@ sub vcl_hash {
}
sub vcl_backend_response {
set beresp.storage = storage.disk;
set beresp.storage = storage.default;
if (bereq.url ~ "(?i)\.(png|gif|jpg|jpeg|svg)$") {
unset beresp.http.Set-Cookie;
set beresp.ttl = 3d;
}
if (bereq.url ~ "(?i)\.(css|js|woff|woff2)$") {
set beresp.do_gzip = true;
unset beresp.http.Set-Cookie;
set beresp.ttl = 7d;
}