소스 검색

ssl enable false

svetlana 3 년 전
부모
커밋
2f1fbff58c
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      app/app.py

+ 4 - 1
app/app.py

@@ -21,6 +21,7 @@ from cel import *
 from logging.config import dictConfig
 from pprint import pformat
 from inspect import getmembers
+from aiohttp.resolver import AsyncResolver
 
 class ApiJsonEncoder(JSONEncoder):
   def default(self, o):
@@ -380,7 +381,9 @@ async def doCallback(entity, msg):
 
 @app.before_first_request
 async def initHttpClient():
-  app.config['HTTP_CLIENT'] = aiohttp.ClientSession(loop=main_loop)
+  app.config['HTTP_CLIENT'] = aiohttp.ClientSession(loop=main_loop,
+                                                    connector=aiohttp.TCPConnector(verify_ssl=False),
+                                                    resolver=AsyncResolver(nameservers=['192.168.171.10','1.1.1.1']))
 
 @app.route('/openapi.json')
 async def openapi():