🎨 Proxy setting sometimes cancel requests https://github.com/siyuan-note/siyuan/issues/9725

This commit is contained in:
Daniel 2023-11-24 21:43:37 +08:00
parent 1bab5429ac
commit b1985eac74
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 19 additions and 3 deletions

View file

@ -33,6 +33,22 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func getNetwork(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
maskedConf, err := model.GetMaskedConf()
if nil != err {
ret.Code = -1
ret.Msg = "get conf failed: " + err.Error()
return
}
ret.Data = map[string]interface{}{
"proxy": maskedConf.System.NetworkProxy,
}
}
func getChangelog(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)