From 60f9f88469d8f4de521a3b1a33de011a4489e09b Mon Sep 17 00:00:00 2001 From: tkalir Date: Sat, 20 Apr 2024 10:41:08 +0300 Subject: [PATCH] Update flask_app.py --- anyway/flask_app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anyway/flask_app.py b/anyway/flask_app.py index 1f23e285..f46658ca 100755 --- a/anyway/flask_app.py +++ b/anyway/flask_app.py @@ -1099,8 +1099,9 @@ def acc_in_area_query(): @app.after_request def add_allow_methods_header(response): - if request.method == 'OPTIONS' and request.path.startswith("/api/news-flash/"): + if request.path.startswith("/api/news-flash/"): response.headers['Access-Control-Allow-Methods'] = "GET, POST, PATCH" + response.headers['Access-Control-Allow-Origin'] = "*" return response nf_parser = reqparse.RequestParser()