mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-09-19 02:18:25 +08:00
fix(ui): Ignore showing APIKEY for security
This commit is contained in:
@@ -179,6 +179,10 @@ func (h *InitializationHandler) CheckStatus(c *gin.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
// ignore api key in response for security
|
||||
for _, model := range models {
|
||||
model.Parameters.APIKey = ""
|
||||
}
|
||||
|
||||
logger.Info(ctx, "System is already initialized")
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
|
||||
@@ -78,11 +78,14 @@ check_platform() {
|
||||
log_info "检测系统平台信息..."
|
||||
if [ "$(uname -m)" = "x86_64" ]; then
|
||||
export PLATFORM="linux/amd64"
|
||||
export TARGETARCH="amd64"
|
||||
elif [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ]; then
|
||||
export PLATFORM="linux/arm64"
|
||||
export TARGETARCH="arm64"
|
||||
else
|
||||
log_warning "未识别的平台类型:$(uname -m),将使用默认平台 linux/amd64"
|
||||
export PLATFORM="linux/amd64"
|
||||
export TARGETARCH="amd64"
|
||||
fi
|
||||
log_info "当前平台:$PLATFORM"
|
||||
}
|
||||
@@ -120,6 +123,7 @@ build_docreader_image() {
|
||||
docker build \
|
||||
--platform $PLATFORM \
|
||||
--build-arg PLATFORM=$PLATFORM \
|
||||
--build-arg TARGETARCH=$TARGETARCH \
|
||||
-f docker/Dockerfile.docreader \
|
||||
-t wechatopenai/weknora-docreader:latest \
|
||||
.
|
||||
|
||||
Reference in New Issue
Block a user