1分钟
配置方式
whistle的所有操作都可以通过配置实现,配置方式扩展于系统hosts配置方式(ip domain
或组合方式ip domain1 domain2 domainN
),具有更丰富的匹配模式及更灵活的配置方式。whistle的匹配顺序是从左到右,这与传统hosts从右到左的配置方式不同,但为了兼容传统hosts配置方式,除了pattern和operatorURI都可以为请求url外(这种情况whistle无法自动区分pattern和operatorURI,只能按约定的顺序匹配),其它情况whistle都支持配置两边的位置对调,即:pattern operatorURI
和operatorURI pattern
等价。
whistle跟传统hosts配置一样也采用
#
为注释符号
学员评价