fix(ui): Ignore showing APIKEY for security

This commit is contained in:
wizardchen
2025-09-15 14:52:00 +08:00
committed by lyingbug
parent 092b30af3e
commit cd249df8c8
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -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{
+4
View File
@@ -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 \
.