From e826311c34d405d9df38c0b77dede9c893cb0c3c Mon Sep 17 00:00:00 2001 From: ThisBirchWood Date: Thu, 23 Jan 2025 10:32:18 +0000 Subject: [PATCH] Reimported render_template in main, for development purposes for now, and fixed /api endpoint not working --- nginx/nginx.conf | 1 + web_server/backend/blueprints/main.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 3cf4145..51f48a6 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -39,6 +39,7 @@ http { } location /api/ { + rewrite ^/api/(.*)$ /$1 break; proxy_pass http://web_server:5000; # flask-app is the name of the Flask container in docker-compose } } diff --git a/web_server/backend/blueprints/main.py b/web_server/backend/blueprints/main.py index 9c8f147..539b41b 100644 --- a/web_server/backend/blueprints/main.py +++ b/web_server/backend/blueprints/main.py @@ -1,4 +1,4 @@ -from flask import Blueprint +from flask import Blueprint, render_template main_bp = Blueprint("app", __name__)