From 987951e43f92ae96f458409a1219da08a2c73013 Mon Sep 17 00:00:00 2001 From: milaq Date: Tue, 27 Aug 2019 00:29:53 +0200 Subject: [PATCH] Don't use redirect but direct response when handling upstream API calls --- ycast/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ycast/server.py b/ycast/server.py index 8692a74..212b650 100644 --- a/ycast/server.py +++ b/ycast/server.py @@ -113,14 +113,14 @@ def upstream(path): if 'statxml.asp' in path and request.args.get('id'): return get_station_info() if 'loginXML.asp' in path: - return redirect(url_for('landing', _external=True), code=302) + return landing() logging.error("Unhandled upstream query (/setupapp/%s)", path) abort(404) @app.route('/', defaults={'path': ''}) @app.route('/' + PATH_ROOT + '/', defaults={'path': ''}) -def landing(path): +def landing(path=''): page = vtuner.Page() page.add(vtuner.Directory('Radiobrowser', url_for('radiobrowser_landing', _external=True), 4)) if my_stations_enabled: