2022-08-02 14:16:58 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
2022-08-08 04:52:54 +00:00
|
|
|
"github.com/alist-org/alist/v3/server/common"
|
2022-08-02 14:16:58 +00:00
|
|
|
"github.com/alist-org/alist/v3/server/middlewares"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
func dev(g *gin.RouterGroup) {
|
|
|
|
g.GET("/path/*path", middlewares.Down, func(ctx *gin.Context) {
|
|
|
|
rawPath := ctx.MustGet("path").(string)
|
|
|
|
ctx.JSON(200, gin.H{
|
|
|
|
"path": rawPath,
|
|
|
|
})
|
|
|
|
})
|
2022-08-08 04:52:54 +00:00
|
|
|
g.GET("/hide_privacy", func(ctx *gin.Context) {
|
|
|
|
common.ErrorStrResp(ctx, "This is ip: 1.1.1.1", 400)
|
|
|
|
})
|
2022-08-02 14:16:58 +00:00
|
|
|
}
|