Skip to content

fix: 添加SKIP_TLS_VERIFY选项用于跳过TLS证书校验 #2194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

garenchan
Copy link

@garenchan garenchan commented Mar 14, 2025

问题描述

我们可能会使用一些自己运行的模型,然后API使用了https协议,但是证书是自签名的,这种情况下one-api就代理不了这个模型,页面点击“测试”会报错:错误:do request failed: Post "https://1.1.1.1:4430/v1/chat/completions": tls: failed to verify certificate: x509: cannot validate certificate for 1.1.1.1 because it doesn't contain any IP SANs

解决办法

提供一个SKIP_TLS_VERIFY选项,可用于全局跳过TLS证书校验,默认不开启

自测截图

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant