DBFahrerKaterchen3 commited on
Commit
484dca8
·
verified ·
1 Parent(s): 415e3d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -3,6 +3,8 @@ import urllib.parse
3
  from fastapi import FastAPI, HTTPException
4
  from fastapi.responses import HTMLResponse, RedirectResponse
5
  import requests
 
 
6
 
7
  app = FastAPI()
8
 
@@ -56,7 +58,8 @@ async def oauth_callback(code: str = None):
56
  }
57
  headers = {"Content-Type": "application/x-www-form-urlencoded"}
58
 
59
- token_res = requests.post(token_url, data=data, headers=headers)
 
60
  token_data = token_res.json()
61
 
62
  if "access_token" not in token_data:
 
3
  from fastapi import FastAPI, HTTPException
4
  from fastapi.responses import HTMLResponse, RedirectResponse
5
  import requests
6
+ import urllib3
7
+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
8
 
9
  app = FastAPI()
10
 
 
58
  }
59
  headers = {"Content-Type": "application/x-www-form-urlencoded"}
60
 
61
+ # Füge 'verify=False' am Ende hinzu, um den SSL-Handshake-Absturz zu umgehen
62
+ token_res = requests.post(token_url, data=data, headers=headers, verify=False)
63
  token_data = token_res.json()
64
 
65
  if "access_token" not in token_data: