WIP-CHECKPOINT[auth-refactor]: 固化工程师崩溃前部分成果 + 同树其他未提交WIP(仅源码,不含密钥/二进制)-- 待重激活工程师续作
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Update nginx.conf to add 10.240.0.0/16"""
|
||||
import re
|
||||
|
||||
with open('/opt/wecom-it-desk/nginx/nginx.conf', 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
# Add 10.240.0.0/16 after 10.212.0.0/16 in both locations
|
||||
content = content.replace(
|
||||
'allow 10.212.0.0/16; # VPN 网段\n',
|
||||
'allow 10.212.0.0/16; # VPN 网段\n allow 10.240.0.0/16; # 内网段 - 办公网(新增)\n'
|
||||
)
|
||||
content = content.replace(
|
||||
'allow 10.212.0.0/16;\n',
|
||||
'allow 10.212.0.0/16;\n allow 10.240.0.0/16; # 内网段 - 办公网(新增)\n'
|
||||
)
|
||||
|
||||
with open('/opt/wecom-it-desk/nginx/nginx.conf', 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
print('Done')
|
||||
Reference in New Issue
Block a user