mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-29 03:05:57 +08:00
refactor: refactor relay part
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"one-api/common"
|
||||
"one-api/common/logger"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
@@ -17,7 +18,7 @@ func SetRouter(router *gin.Engine, buildFS embed.FS) {
|
||||
frontendBaseUrl := os.Getenv("FRONTEND_BASE_URL")
|
||||
if common.IsMasterNode && frontendBaseUrl != "" {
|
||||
frontendBaseUrl = ""
|
||||
common.SysLog("FRONTEND_BASE_URL is ignored on master node")
|
||||
logger.SysLog("FRONTEND_BASE_URL is ignored on master node")
|
||||
}
|
||||
if frontendBaseUrl == "" {
|
||||
SetWebRouter(router, buildFS)
|
||||
|
||||
Reference in New Issue
Block a user