Skip to content

Instantly share code, notes, and snippets.

View czerasz's full-sized avatar

Michał Czeraszkiewicz czerasz

View GitHub Profile
@czerasz
czerasz / varnish-jsonp.vcl
Last active November 1, 2016 20:33 — forked from simonw/varnish-jsonp.vcl
Get Varnish to handle JSONP requests - working example
backend jsonp_varnish {
.host = "localhost";
.port = "80";
}
#------------- begin jsonp functionality -------------#
# How the jsonp_template_backend dispatches to the ESI generating code:
sub jsonp_throw_error_recv {
if (req.url == "/JSONP-ESI-TEMPLATE") {
error 760;