在vcl_recv中,我正在尝试向URL中包含以下字符的请求发送403:“,',<,>,(和)
if(req.url ~ "[\'\<\>()].*\.html" ) {
return (synth(403, "Forbidden"));
}
一切都有效,除了双引号“我试过正则表达式:
"[\"\'\<\>()].*\.html"
"[\\"\'\<\>()].*\.html"
"[%22\'\<\>()].*\.html"
"[x22\'\<\>()].*\.html"
所有这些都没有编译“varnishd -C -f default.vcl”我目前在varnish-4.1.1有谁知道如何逃避“正确?
%22为我工作,我需要在Fastly界面内创建一个cookie函数
"location_data={%22geo.continent_code%22:%22"client.geo.continent_code"%22,%22geo.country_code%22:%22"client.geo.country_code"%22,%22geo.city.ascii%22:%22"client.geo.city.ascii"%22,%22geo.postal_code%22:%22"client.geo.postal_code"%22};Path=/"
%22
会在Varnish VCL的引用字符串中给你双引号