From cf94832ef01072562a7274953ba65f19a104b975 Mon Sep 17 00:00:00 2001 From: adams549659584 <13760614423@163.com> Date: Tue, 9 May 2023 12:28:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20localhost=20=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E8=B0=83=E8=AF=95=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- web/js/index.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 848635b..08817cf 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Go_Proxy_BingAI_SOCKS_PWD=xxx ## 部署 -> 需 https 域名 (自行配置 nginx 等) +> ⭐ 需 https 域名 (自行配置 nginx 等) (前后端都有限制 只有在HTTPS的情况下,浏览器 Accept-Encoding 才会包含 br , localhost 除外) > 支持 Linux (amd64 / arm64)、Windows (amd64 / arm64) diff --git a/web/js/index.js b/web/js/index.js index 7aae7da..c00a5c4 100644 --- a/web/js/index.js +++ b/web/js/index.js @@ -195,6 +195,11 @@ async function clearCache() { // 隐藏加载中 hideLoading(); + // 支持 localhost 可开发调试用 + if (location.hostname === 'localhost') { + CIB.config.sydney.hostnamesToBypassSecureConnection = CIB.config.sydney.hostnamesToBypassSecureConnection.filter((x) => x !== location.hostname); + } + // todo 反馈暂时无法使用,先移除 document .querySelector('cib-serp')