Update app.py
Browse files
app.py
CHANGED
|
@@ -43,18 +43,10 @@ def face_recognition(face_payload):
|
|
| 43 |
url = 'https://face-recognition26.p.rapidapi.com/api/face_compare_base64'
|
| 44 |
resp = send_rapidapi(url, face_payload)
|
| 45 |
return resp
|
| 46 |
-
|
| 47 |
-
@app.before_request
|
| 48 |
-
def before_request():
|
| 49 |
-
scheme = request.headers.get('X-Forwarded-Proto')
|
| 50 |
-
if scheme and scheme == 'http' and request.url.startswith('http://'):
|
| 51 |
-
url = request.url.replace('http://', 'https://', 1)
|
| 52 |
-
code = 301
|
| 53 |
-
return redirect(url, code=code)
|
| 54 |
|
| 55 |
@app.route("/")
|
| 56 |
def index():
|
| 57 |
-
return redirect(url_for('
|
| 58 |
|
| 59 |
@app.route("/id_type/", methods=['GET'])
|
| 60 |
def id_type():
|
|
|
|
| 43 |
url = 'https://face-recognition26.p.rapidapi.com/api/face_compare_base64'
|
| 44 |
resp = send_rapidapi(url, face_payload)
|
| 45 |
return resp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
@app.route("/")
|
| 48 |
def index():
|
| 49 |
+
return redirect(url_for('id_type'), _scheme="https")
|
| 50 |
|
| 51 |
@app.route("/id_type/", methods=['GET'])
|
| 52 |
def id_type():
|