mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-05-23 19:17:41 +08:00
fix: 尝试修复aiohttp请求时的代理配置 #21
This commit is contained in:
parent
068dc5ab89
commit
5fb8913704
@ -229,7 +229,7 @@ async def AsyncRequest(url, options = {}):
|
|||||||
@ return: common.Httpx.ClientResponse类型的响应数据
|
@ return: common.Httpx.ClientResponse类型的响应数据
|
||||||
'''
|
'''
|
||||||
if (not variable.aioSession):
|
if (not variable.aioSession):
|
||||||
variable.aioSession = aiohttp.ClientSession()
|
variable.aioSession = aiohttp.ClientSession(trust_env=True)
|
||||||
# 缓存读取
|
# 缓存读取
|
||||||
cache_key = f'{url}{options}'
|
cache_key = f'{url}{options}'
|
||||||
if (isinstance(options.get('cache-ignore'), list)):
|
if (isinstance(options.get('cache-ignore'), list)):
|
||||||
|
2
main.py
2
main.py
@ -208,7 +208,7 @@ async def run_app():
|
|||||||
|
|
||||||
async def initMain():
|
async def initMain():
|
||||||
await scheduler.run()
|
await scheduler.run()
|
||||||
variable.aioSession = aiohttp.ClientSession()
|
variable.aioSession = aiohttp.ClientSession(trust_env=True)
|
||||||
try:
|
try:
|
||||||
await run_app()
|
await run_app()
|
||||||
logger.info("服务器启动成功,请按下Ctrl + C停止")
|
logger.info("服务器启动成功,请按下Ctrl + C停止")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user