auduny
1
Hi. I’ve tried to figure out how the “Custom Rule” works, but so far I’m not getting far
What I’m trying to do is to detect varnish hits from custom http-headers
Just to see if it works i added the following file
[ay@wpt:/var/www/webpagetest] production+* ± cat www/settings/customrules.txt
klemz=static
Where klemz is the name of the rule and “static” is a regexp i know exists within the value of some of the headers…
But It does not seem to work…
Anyone know how this works?
auduny
2
Bump. Anyone know how this functionality work, or if it’s really implemented?
Currently the custom rules only work by scanning the requests for a matching mime type and then matching the custom rul against the body of the response (headers are excluded): https://github.com/WPO-Foundation/webpagetest/blob/master/agent/wpthook/optimization_checks.cc#L579
Shouldn’t be all that hard to change it to also match against headers.