fix: apply managed Nginx public entry without service restart
This commit is contained in:
1 parent
36d653b32b
commit
e4f1059880
11 files changed
+338
-33
No files matched your search
@@ -38,6 +38,26 @@ func authGatewayPort(publicBase string) (int, error) {
|
||||
return port, nil
|
||||
}
|
||||
|
||||
func checkAuthGatewayChange(oldBase, newBase string) error {
|
||||
if oldBase == "" || oldBase == newBase {
|
||||
return nil
|
||||
}
|
||||
port, err := authGatewayPort(oldBase)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if port != 0 {
|
||||
return &activeAuthEntry{}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type activeAuthEntry struct{}
|
||||
|
||||
func (*activeAuthEntry) Error() string {
|
||||
return "运行中的 OIDC 专线仍使用旧公网地址,请先停止或迁移专线"
|
||||
}
|
||||
|
||||
type gatewayConflict struct{}
|
||||
|
||||
func (*gatewayConflict) Error() string {
|
||||
|
||||
Reference in new issue
Block a user