演示环境过滤器

This commit is contained in:
zhangwenjian committed 2020-03-16 11:17:57 +08:00
1 parent b18b4a361b
commit 3edd43e7a0
1 file changed
+1 -1
+1 -1
View File
@@ -10,7 +10,7 @@ func DemoEvn() gin.HandlerFunc {
return func(c *gin.Context) {
if config.ApplicationConfig.Env == "demo" {
method := c.Request.Method
if method == "GET" || method == "OPTIONS" || c.Request.RequestURI == "/login" || c.Request.RequestURI == "/logout" {
if method == "GET" || method == "OPTIONS" || c.Request.RequestURI == "/login" || c.Request.RequestURI == "/api/v1/logout" {
c.Next()
} else {
c.JSON(http.StatusOK, gin.H{