libvmod-rewrite icon indicating copy to clipboard operation
libvmod-rewrite copied to clipboard

Cache hits return null objects

Open barryrobison opened this issue 9 years ago • 1 comments

Rewrite works fine on the first hit, but if a TTL is set then cache hits cause a 502 BAD_GATEWAY response.

VCL looks like

sub vcl_deliver { if ( obj.hits == 0 && req.http.host == "blog.staging.wpengine.com" ) { rewrite.rewrite_re("blog.staging.wpengine.com", req.http.orighost+"/blog"); rewrite.rewrite_re({""/wp-content"}, {""/blog/wp-content"}); rewrite.rewrite_re({"'/wp-content"}, {"'/blog/wp-content"}); } }

barryrobison avatar Mar 03 '16 03:03 barryrobison

Tested against 3.0.5 and 3.0.7.

barryrobison avatar Mar 03 '16 22:03 barryrobison