diff --git a/hosts/alo-cloud-1/reverse-proxy.nix b/hosts/alo-cloud-1/reverse-proxy.nix index 49c2b27..6d55d59 100644 --- a/hosts/alo-cloud-1/reverse-proxy.nix +++ b/hosts/alo-cloud-1/reverse-proxy.nix @@ -140,7 +140,23 @@ 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; + } ''; }; }