小编jer*_*yjr的帖子

正则表达式匹配主机请求

鉴于 Varnish 3.0.2 中的此 VCL 代码:

sub vcl_recv {
  if (req.http.host !~ "^(?i)(www|m|mobile)\.example\.com$" || req.http.host !~ "^(?i)example\.com$") {
    error 403 "Forbidden";
  }
  return(lookup);
}
Run Code Online (Sandbox Code Playgroud)

谁能解释为什么我在“www.example.com”上收到 403?

谢谢

regex varnish

0
推荐指数
1
解决办法
3187
查看次数

标签 统计

regex ×1

varnish ×1