From 7b8c7e1b0ab88c0fce1164d0b0b5480ae1ba2a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E6=A3=AE?= Date: Wed, 7 Aug 2024 16:27:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=BA=94=E7=94=A8=20Iframely?= =?UTF-8?q?=20=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 萌森 --- apps/iframely/2.4.3/config/config.local.js | 9 +++------ apps/iframely/2.4.3/docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/iframely/2.4.3/config/config.local.js b/apps/iframely/2.4.3/config/config.local.js index 31ed6059..ec31fc7f 100644 --- a/apps/iframely/2.4.3/config/config.local.js +++ b/apps/iframely/2.4.3/config/config.local.js @@ -4,13 +4,10 @@ import {dirname} from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); -const proxyUrlBase = process.env.PROXY_URL || ''; -const proxyUrl = proxyUrlBase ? `${proxyUrlBase}?url={url}` : ''; - export default { DEBUG: false, RICH_LOG_ENABLED: false, - baseAppUrl: "http://localhost:8061", + baseAppUrl: process.env.BASE_APP_URL || "http://localhost:8061", relativeStaticUrl: "/r", SKIP_IFRAMELY_RENDERS: true, GROUP_LINKS: true, @@ -93,7 +90,7 @@ export default { ENABLED_PROXY: process.env.ENABLED_PROXY === 'true', - PROXY_URL: proxyUrl, + PROXY_URL: process.env.PROXY_URL, PROXY: [{ re: [ /^https?:\/\/www\.google\.com/, @@ -117,7 +114,7 @@ export default { /^https?:\/\/www\.linkedin\.com/ ], proxy: process.env.ENABLED_PROXY === 'true', - proxy_url: proxyUrl, + proxy_url: process.env.PROXY_URL, user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3', headers: {}, cache_ttl: 3600 diff --git a/apps/iframely/2.4.3/docker-compose.yml b/apps/iframely/2.4.3/docker-compose.yml index 2df971f7..f4abc902 100644 --- a/apps/iframely/2.4.3/docker-compose.yml +++ b/apps/iframely/2.4.3/docker-compose.yml @@ -23,6 +23,6 @@ services: environment: - NODE_ENV=production - PORT=8061 - - HOST='0.0.0.0' + - HOST=0.0.0.0 - HTTP_PROXY=${PROXY_URL:-} - HTTPS_PROXY=${PROXY_URL:-}