Skip to content

Commit

Permalink
feat: ✨ localhost 开发调试支持
Browse files Browse the repository at this point in the history
  • Loading branch information
adams549659584 committed May 9, 2023
1 parent 8ba4b1e commit cf94832
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions web/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit cf94832

Please sign in to comment.