chore:Add the whitelist of webdev endpoints to data.yml and Docker Co… (#1513)

* chore:Add the whitelist of webdev endpoints to data.yml and Docker Compose.yml to allow webdav synchronization

* fix:添加更新脚本,添加WHITE_WEBDEV_ENDPOINTS参数
This commit is contained in:
Anye 2024-06-01 22:42:15 +08:00 committed by GitHub
parent 503422ec2b
commit 78c4bd22b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View File

@ -37,4 +37,11 @@ additionalProperties:
labelEn: API interface address
labelZh: API接口地址
required: true
type: text
- default: ""
edit: true
envKey: WHITE_WEBDEV_ENDPOINTS
labelEn: White list of webdev endpoints
labelZh: webdev 白名单
required: false
type: text

View File

@ -11,6 +11,7 @@ services:
- "CODE=${SECRET_KEY}"
- "PROXY_URL=${PROXY}"
- "BASE_URL=${API_BASE_URL}"
- "WHITE_WEBDEV_ENDPOINTS=${WHITE_WEBDEV_ENDPOINTS}"
image: yidadaa/chatgpt-next-web:v2.12.3
labels:
createdBy: "Apps"

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [[ -f ./.env ]]; then
if grep -q "WHITE_WEBDEV_ENDPOINTS" ./.env; then
echo "WHITE_WEBDEV_ENDPOINTS 已存在"
else
echo 'WHITE_WEBDEV_ENDPOINTS=""' >> ./.env
fi
else
echo ".env 文件不存在"
fi