演示环境过滤器
This commit is contained in:
1 parent
b18b4a361b
commit
3edd43e7a0
1 file changed
+1
-1
@@ -10,7 +10,7 @@ func DemoEvn() gin.HandlerFunc {
|
|||||||
return func(c *gin.Context) {
|
return func(c *gin.Context) {
|
||||||
if config.ApplicationConfig.Env == "demo" {
|
if config.ApplicationConfig.Env == "demo" {
|
||||||
method := c.Request.Method
|
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()
|
c.Next()
|
||||||
} else {
|
} else {
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
|||||||
Reference in new issue
Block a user