This commit is contained in:
parent
e4e1945ea5
commit
ff0cb6eb31
|
|
@ -149,6 +149,7 @@ data/hook_*.json
|
|||
data/letsencrypt.json
|
||||
data/basic_auth.json
|
||||
data/api.json
|
||||
data/bind_domain.pl
|
||||
|
||||
plugins/l2tp
|
||||
plugins/openlitespeed
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class config_api:
|
|||
def setPanelDomainApi(self):
|
||||
domain = request.form.get('domain', '')
|
||||
|
||||
cfg_domain = 'data/domain.conf'
|
||||
cfg_domain = 'data/bind_domain.pl'
|
||||
if domain == '':
|
||||
os.remove(cfg_domain)
|
||||
return mw.returnJson(True, '清空域名成功!')
|
||||
|
|
@ -629,6 +629,13 @@ class config_api:
|
|||
else:
|
||||
data['basic_auth'] = ''
|
||||
|
||||
cfg_domain = 'data/bind_domain.pl'
|
||||
if os.path.exists(cfg_domain):
|
||||
domain = mw.readFile(cfg_domain)
|
||||
data['bind_domain'] = domain.strip()
|
||||
else:
|
||||
data['bind_domain'] = ''
|
||||
|
||||
api_token = self.__api_addr
|
||||
if os.path.exists(api_token):
|
||||
bac = mw.readFile(api_token)
|
||||
|
|
|
|||
Loading…
Reference in New Issue