update 404 tips

This commit is contained in:
2023-09-20 14:58:41 +08:00
parent 32ced78da4
commit db0a36fc00

View File

@@ -586,10 +586,14 @@ func (c *HandleController) MakeProxyFunc() func(context *gin.Context) {
if res.Code == http.StatusOK { if res.Code == http.StatusOK {
res.Success = true res.Success = true
res.Data = string(body) res.Data = string(body)
res.Message = "Proxy to " + requestUrl + " success" res.Message = fmt.Sprintf("Proxy to %s success", requestUrl)
} else { } else {
res.Success = false res.Success = false
res.Message = "Proxy to " + requestUrl + " error: " + string(body) if res.Code == http.StatusNotFound {
res.Message = fmt.Sprintf("Proxy to %s error: url not found", requestUrl)
} else {
res.Message = fmt.Sprintf("Proxy to %s error: %s", requestUrl, string(body))
}
} }
} }
log.Printf(res.Message) log.Printf(res.Message)