Skip to content

Conversation

@mapxn
Copy link
Contributor

@mapxn mapxn commented Aug 12, 2023

Fix the wrong version number ERROR under reverse proxy mode.

在docker模式下使用反向代理,在调用/claude/****/v1/chat/completions 接口时会出ERR_SSL_WRONG_VERSION_NUMBER错误。
原因是在docker+反代模式下把请求转发到了 https:localhost:3000,而localhost不支持https。

修复内容:转发前判断request.url.host,如果是https:localhost:3000则改写为http:localhost:3000

docker模式已测试通过,vercel部署已测试通过。

Fix the wrong version number ERROR under reverse proxy mode.
@UNICKCHENG
Copy link
Owner

哇,棒 👍,感谢支持,我将会尽快合并到主分支

@UNICKCHENG UNICKCHENG changed the base branch from main to fix/ssl-version-error August 12, 2023 03:03
@UNICKCHENG UNICKCHENG merged commit 8f94b7a into UNICKCHENG:fix/ssl-version-error Aug 12, 2023
UNICKCHENG added a commit that referenced this pull request Aug 12, 2023
github-actions bot pushed a commit that referenced this pull request Aug 12, 2023
## [0.3.9](v0.3.8...v0.3.9) (2023-08-12)

### Bug Fixes

* fix ssl version error (#49) ([7f47c81](7f47c81))
@github-actions
Copy link

🎉 This PR is included in version 0.3.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

UNICKCHENG added a commit that referenced this pull request Aug 12, 2023
不清楚为什么 middleware 已经成功拦截并修改了 request.nextUrl, 但是全局没有生效。目前先通过方法手动封装处理

SEE #44
github-actions bot pushed a commit that referenced this pull request Aug 12, 2023
## [0.3.12](v0.3.11...v0.3.12) (2023-08-12)

### Bug Fixes

* **claude:** fix ssl version error ( #49 ) ([044ee70](044ee70))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants