free-gpt commited on
Commit
9de834d
1 Parent(s): 351845b

Update run_app.py

Browse files
Files changed (1) hide show
  1. run_app.py +9 -0
run_app.py CHANGED
@@ -21,6 +21,15 @@ from g4f.client import AsyncClient
21
  from g4f.typing import Messages
22
  from g4f.cookies import read_cookie_files
23
 
 
 
 
 
 
 
 
 
 
24
  def create_app():
25
  app = FastAPI()
26
  api = Api2(app)
 
21
  from g4f.typing import Messages
22
  from g4f.cookies import read_cookie_files
23
 
24
+ import ssl
25
+
26
+ orig_sslsocket_init = ssl.SSLSocket.__init__
27
+ def new_sslsocket_init(self, *args, **kwargs):
28
+ kwargs['cert_reqs'] = ssl.CERT_NONE
29
+ orig_sslsocket_init(self, *args, **kwargs)
30
+
31
+ ssl.SSLSocket.__init__ = new_sslsocket_init
32
+
33
  def create_app():
34
  app = FastAPI()
35
  api = Api2(app)