Skip to content

2 host_method_Mod

star edited this page Apr 24, 2018 · 5 revisions

域名(host),方法(method) 过滤模块

(对应配置文件:conf_json/host_method_Mod.json)

该模块是访问控制的 第二步 ,是对 hostmethod 控制的

配置样例:

[
    {
        "state":"on",
        # 该条规则是否开启
        "method":[
            {
                "POST":true,
                "GET":true
                # 允许的 method
            },
            "dict"
            # 表示该规则是用list匹配,同样支持其他写法,如 table 字符串等于/保护正则 这里建议使用list或者table
        ],
        "hostname":[
            {
                "101.200.122.200:5460":true,
                "101.200.122.200":true,
                "www.g.com":true
                # 允许的host名称
            },
            "dict"
            # 表示该条规则是用list匹配
        ]
    },
    ... # 下一条规则
]