Commit 33756000 authored by 智勇's avatar 智勇

合并order

parent 9ebdace0
......@@ -9,7 +9,6 @@ import re
import copy
import sys
opApiHost = 'http://172.30.220.22:3003'
f = io.open('replace_config.yaml', 'r', encoding='utf-8')
res = yaml.load(f)
print("全部配置信息:", res)
......@@ -49,7 +48,7 @@ for file in files:
if rule.get('useNamespace', None) and rule['to']:
rule['to'] = '-' + namespace + rule['to']
if rule.get('useDomain', None):
if rule.get('useHost', None):
domain = sys.argv[1].split('.')[0]
rule['to'] = '//' + domain + rule['to']
......
# reg: 匹配的正则
# to: 正则匹配后替换需要的值
# useNamespace: 是否在替换的值前追加 '-[namespace名称]'
# useHost: 是否在替换时使用该项目域名的第一段
# order 默认0, 负数用在自定义属性上,在通用规则前生效
# useDomain xxx
rule: &rule
reg: ''
to: ''
useNamespace: false
useDomain: false
useHost: false
order: 0
lkbDomain: &lkbDomain '.liangkebang.com'
......@@ -53,14 +53,13 @@ staticRule: &staticRule
reg: '//static[-/0-9a-z.]*public'
to: *lkbDomain
useNamespace: true
useDomain: true
useHost: true
common: &common
h5AuthRule: *h5AuthRule
xyqbApiRule: *xyqbApiRule
quantgroupApiRule: *quantgroupApiRule
xyqbCookieRule: *xyqbCookieRule
# xyqbApiDomainRule: *xyqbApiDomainRule
qgApiRule: *qgApiRule
qgCookieRule: *qgCookieRule
staticRule: *staticRule
\ No newline at end of file
quantgroupApiRule: *quantgroupApiRule
staticRule: *staticRule
xyqbApiRule: *xyqbApiRule
xyqbCookieRule: *xyqbCookieRule
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment