mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 23:17:21 +08:00
fix: change logic for the system proxy setting (#8839)
This commit is contained in:
parent
ee04f4afc8
commit
610be1755a
2 changed files with 12 additions and 7 deletions
|
@ -212,7 +212,11 @@ func (u *SettingService) UpdateProxy(req dto.ProxyUpdate) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
if err := xpack.Sync(constant.SyncSystemProxy); err != nil {
|
syncScope := constant.SyncSystemProxy
|
||||||
|
if req.WithDockerRestart {
|
||||||
|
syncScope = constant.SyncSystemProxyWithRestartDocker
|
||||||
|
}
|
||||||
|
if err := xpack.Sync(syncScope); err != nil {
|
||||||
global.LOG.Errorf("sync proxy to node failed, err: %v", err)
|
global.LOG.Errorf("sync proxy to node failed, err: %v", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
|
@ -43,12 +43,13 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SyncSystemProxy = "SyncSystemProxy"
|
SyncSystemProxy = "SyncSystemProxy"
|
||||||
SyncScripts = "SyncScripts"
|
SyncScripts = "SyncScripts"
|
||||||
SyncBackupAccounts = "SyncBackupAccounts"
|
SyncBackupAccounts = "SyncBackupAccounts"
|
||||||
SyncAlertSetting = "SyncAlertSetting"
|
SyncAlertSetting = "SyncAlertSetting"
|
||||||
SyncCustomApp = "SyncCustomApp"
|
SyncCustomApp = "SyncCustomApp"
|
||||||
SyncLanguage = "SyncLanguage"
|
SyncLanguage = "SyncLanguage"
|
||||||
|
SyncSystemProxyWithRestartDocker = "SyncSystemProxyWithRestartDocker"
|
||||||
)
|
)
|
||||||
|
|
||||||
var WebUrlMap = map[string]struct{}{
|
var WebUrlMap = map[string]struct{}{
|
||||||
|
|
Loading…
Add table
Reference in a new issue