mirror of https://github.com/Xhofe/alist
parent
5994c17b4e
commit
365fc40dfe
|
@ -102,6 +102,10 @@ func Static(r *gin.RouterGroup, noRoute func(handlers ...gin.HandlerFunc)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
noRoute(func(c *gin.Context) {
|
noRoute(func(c *gin.Context) {
|
||||||
|
if c.Request.Method != "GET" && c.Request.Method != "POST" {
|
||||||
|
c.Status(405)
|
||||||
|
return
|
||||||
|
}
|
||||||
c.Header("Content-Type", "text/html")
|
c.Header("Content-Type", "text/html")
|
||||||
c.Status(200)
|
c.Status(200)
|
||||||
if strings.HasPrefix(c.Request.URL.Path, "/@manage") {
|
if strings.HasPrefix(c.Request.URL.Path, "/@manage") {
|
||||||
|
|
Loading…
Reference in New Issue