1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 14:08:06 +08:00

feat: Demo 环境白名单增加部分放行接口 (#2413)

This commit is contained in:
ssongliu 2023-09-28 16:16:17 +08:00 committed by GitHub
parent c6111de050
commit 11c5558334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,13 @@
package middleware package middleware
import ( import (
"net/http"
"strings"
"github.com/1Panel-dev/1Panel/backend/app/dto" "github.com/1Panel-dev/1Panel/backend/app/dto"
"github.com/1Panel-dev/1Panel/backend/buserr" "github.com/1Panel-dev/1Panel/backend/buserr"
"github.com/1Panel-dev/1Panel/backend/constant" "github.com/1Panel-dev/1Panel/backend/constant"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"net/http"
"strings"
) )
var whiteUrlList = map[string]struct{}{ var whiteUrlList = map[string]struct{}{
@ -18,6 +19,14 @@ var whiteUrlList = map[string]struct{}{
"/api/v1/logs/operation": {}, "/api/v1/logs/operation": {},
"/api/v1/logs/login": {}, "/api/v1/logs/login": {},
"/api/v1/auth/logout": {}, "/api/v1/auth/logout": {},
"/api/v1/apps/installed/loadport": {},
"/api/v1/apps/installed/check": {},
"/api/v1/apps/installed/conninfo": {},
"/api/v1/databases/load/file": {},
"/api/v1/databases/variables": {},
"/api/v1/databases/status": {},
"/api/v1/databases/baseinfo": {},
} }
func DemoHandle() gin.HandlerFunc { func DemoHandle() gin.HandlerFunc {