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__)