From be407813946665ce571a5124a82f08920a32cd44 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 27 Dec 2022 14:28:25 +0100 Subject: [PATCH] Add default for WEB_API, re-add flask-restx to deps, remove whitespace --- core/admin/mailu/configuration.py | 5 ++--- core/base/requirements-dev.txt | 1 + core/base/requirements-prod.txt | 1 + core/nginx/conf/nginx.conf | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index b77e2cf1..59b692ec 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -69,10 +69,9 @@ DEFAULT_CONFIG = { 'RECAPTCHA_PRIVATE_KEY': '', 'LOGO_URL': None, 'LOGO_BACKGROUND': None, - 'API': False, # Advanced settings - 'API' : False, - 'WEB_API' : '/api', + 'API': False, + 'WEB_API': '/api', 'API_TOKEN': None, 'LOG_LEVEL': 'WARNING', 'SESSION_KEY_BITS': 128, diff --git a/core/base/requirements-dev.txt b/core/base/requirements-dev.txt index 5a9df4b1..32041642 100644 --- a/core/base/requirements-dev.txt +++ b/core/base/requirements-dev.txt @@ -15,6 +15,7 @@ Flask-DebugToolbar Flask-Login flask-marshmallow Flask-Migrate +Flask-RESTX Flask-SQLAlchemy<3 Flask-WTF gunicorn diff --git a/core/base/requirements-prod.txt b/core/base/requirements-prod.txt index 0da5219b..918d85f4 100644 --- a/core/base/requirements-prod.txt +++ b/core/base/requirements-prod.txt @@ -25,6 +25,7 @@ Flask-DebugToolbar==0.13.1 Flask-Login==0.6.2 flask-marshmallow==0.14.0 Flask-Migrate==3.1.0 +Flask-RESTX==1.0.3 Flask-SQLAlchemy==2.5.1 Flask-WTF==1.0.1 frozenlist==1.3.1 diff --git a/core/nginx/conf/nginx.conf b/core/nginx/conf/nginx.conf index 463cee20..3965805c 100644 --- a/core/nginx/conf/nginx.conf +++ b/core/nginx/conf/nginx.conf @@ -245,7 +245,7 @@ http { {% endif %} {% if API %} - location ~ {{ WEB_API }} { + location ~ {{ WEB_API or '/api' }} { include /etc/nginx/proxy.conf; proxy_pass http://$admin; }