mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
chore: rollback incompatible changes to updateConfigs api
This commit is contained in:
@@ -373,9 +373,9 @@ func updateConfigs(w http.ResponseWriter, r *http.Request) {
|
|||||||
} else {
|
} else {
|
||||||
if req.Path == "" {
|
if req.Path == "" {
|
||||||
req.Path = C.Path.Config()
|
req.Path = C.Path.Config()
|
||||||
} else if !filepath.IsLocal(req.Path) {
|
} else if !filepath.IsAbs(req.Path) {
|
||||||
render.Status(r, http.StatusBadRequest)
|
render.Status(r, http.StatusBadRequest)
|
||||||
render.JSON(w, r, newError("path is not a valid absolute path"))
|
render.JSON(w, r, newError("path is not a absolute path"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user