Skip to content

Instantly share code, notes, and snippets.

View alecmuffett's full-sized avatar
💭
arbitrary

Alec Muffett alecmuffett

💭
arbitrary
View GitHub Profile
@alecmuffett
alecmuffett / HTMLStreaming.vcl
Created March 25, 2019 15:00 — forked from section-io-gists/HTMLStreaming.vcl
HTML Streaming solution to cache the HEAD of HTML
#Example of HTML Streaming. This gist involves both Varnish and nginx LUA reverse proxies
#Varnish:
sub vcl_recv {
# Do not stream on non-get requests
if (req.method != "GET" && req.method != "HEAD" && req.method != "PURGE") {
return (pass);
}
# By defaul disable holepunch unless below cases fall through (do not modify this line)