Files
RustProxy/examples/vcl/stream-and-errors-no-store.vcl
2026-11-20 17:18:02 +01:00

18 lines
481 B
Plaintext

// Defense in depth for streaming and transient backend responses.
// Does not implement retries, synthetic error handling or stale-if-error.
sub vcl_recv {
if (req.url ~ "^/(events|stream|webhook)(/|[?]|$)") {
return(pass);
}
}
sub vcl_backend_response {
if (beresp.http.Content-Type ~ "^text/event-stream") {
set beresp.uncacheable = true;
return(deliver);
}
if (beresp.status >= 500) {
set beresp.uncacheable = true;
}
}