diff --git a/backend/main.py b/backend/main.py index 68d3c86..5d24631 100644 --- a/backend/main.py +++ b/backend/main.py @@ -6,6 +6,7 @@ from requests.adapters import HTTPAdapter from urllib3.util import Retry import yt_dlp import io +from urllib.parse import urljoin # Serve frontend static files under `/static` to avoid colliding with API routes app = Flask(__name__, static_folder='../frontend', static_url_path='/static') @@ -105,7 +106,7 @@ def videos_proxy(): def index(): return send_from_directory(app.static_folder, 'index.html') -@app.route('/api/stream', methods=['POST', 'GET']) +@app.route('/api/stream', methods=['POST', 'GET', 'HEAD']) def stream_video(): # Note: