mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-20 13:35:55 +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
|
||||
}
|
||||
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)
|
||||
}
|
||||
}()
|
||||
|
|
|
@ -43,12 +43,13 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
SyncSystemProxy = "SyncSystemProxy"
|
||||
SyncScripts = "SyncScripts"
|
||||
SyncBackupAccounts = "SyncBackupAccounts"
|
||||
SyncAlertSetting = "SyncAlertSetting"
|
||||
SyncCustomApp = "SyncCustomApp"
|
||||
SyncLanguage = "SyncLanguage"
|
||||
SyncSystemProxy = "SyncSystemProxy"
|
||||
SyncScripts = "SyncScripts"
|
||||
SyncBackupAccounts = "SyncBackupAccounts"
|
||||
SyncAlertSetting = "SyncAlertSetting"
|
||||
SyncCustomApp = "SyncCustomApp"
|
||||
SyncLanguage = "SyncLanguage"
|
||||
SyncSystemProxyWithRestartDocker = "SyncSystemProxyWithRestartDocker"
|
||||
)
|
||||
|
||||
var WebUrlMap = map[string]struct{}{
|
||||
|
|
Loading…
Add table
Reference in a new issue