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