-
Notifications
You must be signed in to change notification settings - Fork 421
6 referer_Mod
star edited this page Jan 7, 2018
·
2 revisions
referer_Mod referer规则模块
(对应配置文件:conf_json/referer_Mod.json)
该模块是整个访问控制规则的 第6步 用于配置referer访问控制的
[
{
"state": "on",
# 该条规则开关(on/off)
"uri": ["^/abc.do$","jio"],
# uri匹配规则
# 第一个参数:匹配内容,第二个:匹配方式(这里是正则匹配)
"hostname": ["pass.game.com",""],
# host 匹配规则
# 第一个参数:匹配内容,第二个:匹配方式(这里是字符串等于)
"referer": ["^.*/(www\\.hao123\\.com|www3\\.hao123\\.com)$","jio",true],
# referer 匹配规则
# 第一个参数:匹配内容,第二个:匹配方式(这里是正则),第三个:是否取反(默认false不取反)
"action":"deny"
# 执行动作:拒绝
},
{
"state": "on",
"uri": ["\\.(gif|jpg|png|jpeg|bmp|ico)$","jio"],
"hostname": ["localhost",""],
"referer": ["*",""],
"action":"allow"
# 执行动作:允许
},
... # 下一条referer匹配规则
]