Serve stale content if backend is down.

This commit is contained in:
2025-04-22 06:04:15 +01:00
parent 9b9f03fc20
commit 8a56607163

View File

@@ -140,23 +140,16 @@
backend default {
.host = "100.64.229.126";
.port = "10080";
.probe = {
.url = "/";
.timeout = 1s;
.interval = 5s;
.window = 5;
.threshold = 3;
}
}
}
sub vcl_backend_response {
# default TTL if backend didn't specify one
if (beresp.ttl <= 0s) {
set beresp.ttl = 1h;
}
# serve stale content in case home link is down
set beresp.grace = 240h;
}
sub vcl_backend_response {
# default TTL if backend didn't specify one
if (beresp.ttl <= 0s) {
set beresp.ttl = 1h;
}
# serve stale content in case home link is down
set beresp.grace = 240h;
}
'';
};
}