feat: localhost 开发调试支持

This commit is contained in:
adams549659584 2023-05-09 12:28:30 +08:00
parent 8ba4b1e332
commit cf94832ef0
2 changed files with 6 additions and 1 deletions

View File

@ -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) > 支持 Linux (amd64 / arm64)、Windows (amd64 / arm64)

View File

@ -195,6 +195,11 @@ async function clearCache() {
// 隐藏加载中 // 隐藏加载中
hideLoading(); hideLoading();
// 支持 localhost 可开发调试用
if (location.hostname === 'localhost') {
CIB.config.sydney.hostnamesToBypassSecureConnection = CIB.config.sydney.hostnamesToBypassSecureConnection.filter((x) => x !== location.hostname);
}
// todo 反馈暂时无法使用,先移除 // todo 反馈暂时无法使用,先移除
document document
.querySelector('cib-serp') .querySelector('cib-serp')