Skip to content

[Bug]: 连不上数据库 #347

Answered by markqiu
markqiu asked this question in Q&A
Mar 18, 2025 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

自己解决了。
原来是因为配置了系统的代理服务器的原因。httpx 会自动扫描系统的配置,导致访问 localhost 也通过 proxy 进行。
解决方案是设置一个 NO_PROXY 环境变量。
在本地的.env 中加入一行:
NO_PROXY="http://127.0.0.1/, localhost"

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@yumeng3963
Comment options

Answer selected by bigbrother666sh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #318 on April 07, 2025 03:08.