blob: 68d713aa1335ee8b4d64b5c8360df5c9974d1f13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Varnish in front of cgit with ESI diff fragments
================================================
Set "enable-esi=1" in cgitrc (see cgitrc(5), section EDGE SIDE INCLUDES),
then include cgit-esi.vcl from your VCL:
vcl 4.1;
backend cgit { .host = "127.0.0.1"; .port = "8080"; }
include "/etc/varnish/cgit-esi.vcl";
The included file turns on ESI processing for the commit and diff frames,
hashes the esi-diff fragments on their query string so that all forks share
one rendering per commit, and refuses fragment requests that do not come
from the ESI processor.
cgit-esi.vtc exercises the VCL with a fake cgit backend:
varnishtest -D cgit_vcl=$PWD/cgit-esi.vcl cgit-esi.vtc
|