From 78c4bd22b4de88acb434fef2825b7576f66fc040 Mon Sep 17 00:00:00 2001 From: Anye <53684988+Anyexyz@users.noreply.github.com> Date: Sat, 1 Jun 2024 22:42:15 +0800 Subject: [PATCH] =?UTF-8?q?chore:Add=20the=20whitelist=20of=20webdev=20end?= =?UTF-8?q?points=20to=20data.yml=20and=20Docker=20Co=E2=80=A6=20(#1513)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore:Add the whitelist of webdev endpoints to data.yml and Docker Compose.yml to allow webdav synchronization * fix:添加更新脚本,添加WHITE_WEBDEV_ENDPOINTS参数 --- apps/chatgpt-next-web/2.12.3/data.yml | 7 +++++++ apps/chatgpt-next-web/2.12.3/docker-compose.yml | 1 + apps/chatgpt-next-web/2.12.3/scripts/upgrade.sh | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 apps/chatgpt-next-web/2.12.3/scripts/upgrade.sh diff --git a/apps/chatgpt-next-web/2.12.3/data.yml b/apps/chatgpt-next-web/2.12.3/data.yml index c1c32268a..8fda84336 100644 --- a/apps/chatgpt-next-web/2.12.3/data.yml +++ b/apps/chatgpt-next-web/2.12.3/data.yml @@ -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 \ No newline at end of file diff --git a/apps/chatgpt-next-web/2.12.3/docker-compose.yml b/apps/chatgpt-next-web/2.12.3/docker-compose.yml index 1655e065c..7186f8ba7 100644 --- a/apps/chatgpt-next-web/2.12.3/docker-compose.yml +++ b/apps/chatgpt-next-web/2.12.3/docker-compose.yml @@ -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" diff --git a/apps/chatgpt-next-web/2.12.3/scripts/upgrade.sh b/apps/chatgpt-next-web/2.12.3/scripts/upgrade.sh new file mode 100644 index 000000000..170e0c4ba --- /dev/null +++ b/apps/chatgpt-next-web/2.12.3/scripts/upgrade.sh @@ -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 \ No newline at end of file