|
|
|
@ -199,7 +199,7 @@ func (u *SettingService) UpdateSSL(c *gin.Context, req dto.SSLUpdate) error {
|
|
|
|
|
_ = os.Remove(path.Join(secretDir, "server.crt")) |
|
|
|
|
_ = os.Remove(path.Join(secretDir, "server.key")) |
|
|
|
|
sID, _ := c.Cookie(constant.SessionName) |
|
|
|
|
c.SetCookie(constant.SessionName, sID, 0, "", "", false, false) |
|
|
|
|
c.SetCookie(constant.SessionName, sID, 0, "", "", false, true) |
|
|
|
|
|
|
|
|
|
go func() { |
|
|
|
|
_, err := cmd.Exec("systemctl restart 1panel.service") |
|
|
|
@ -294,7 +294,7 @@ func (u *SettingService) UpdateSSL(c *gin.Context, req dto.SSLUpdate) error {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sID, _ := c.Cookie(constant.SessionName) |
|
|
|
|
c.SetCookie(constant.SessionName, sID, 0, "", "", true, false) |
|
|
|
|
c.SetCookie(constant.SessionName, sID, 0, "", "", true, true) |
|
|
|
|
go func() { |
|
|
|
|
time.Sleep(1 * time.Second) |
|
|
|
|
_, err := cmd.Exec("systemctl restart 1panel.service") |
|
|
|
|