From 769c28a8a2cacbac828bd7eb3d8bfff0dd83e00b Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Tue, 25 Jun 2024 11:07:48 -0600 Subject: [PATCH] minor changes for personal use --- Dockerfile | 2 +- asr/__init__.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b863363..b024b59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,4 @@ FROM python:3.6 ADD . /code WORKDIR /code RUN pip install -r requirements.txt -CMD exec gunicorn -k gevent -b 0.0.0.0:$PORT asr:app +CMD exec gunicorn -k gevent -b 0.0.0.0:443 asr:app diff --git a/asr/__init__.py b/asr/__init__.py index bfdcc3c..e946177 100644 --- a/asr/__init__.py +++ b/asr/__init__.py @@ -54,9 +54,9 @@ def recognise(): access_token, lang = request.host.split('.', 1)[0].split('-', 1) - auth_req = requests.get(f"{AUTH_URL}/api/v1/me/token", headers={'Authorization': f"Bearer {access_token}"}) - if not auth_req.ok: - abort(401) +# auth_req = requests.get(f"{AUTH_URL}/api/v1/me/token", headers={'Authorization': f"Bearer {access_token}"}) +# if not auth_req.ok: +# abort(401) chunks = iter(list(parse_chunks(stream))) content = next(chunks).decode('utf-8')