From defcb3c999c3cb35a48f9c34acedf2ca56ee11e6 Mon Sep 17 00:00:00 2001 From: Carlos Acosta Date: Mon, 10 Jun 2024 16:32:56 -0700 Subject: [PATCH] Update __init__.py fix: use Access-Control-Allow-Methods to specify allowed request methods --- .../Flask-CORS-Example-1/flaskr/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples_from_plants_database/Flask-CORS-Example-1/flaskr/__init__.py b/Examples_from_plants_database/Flask-CORS-Example-1/flaskr/__init__.py index 6ce942c2..9464d139 100644 --- a/Examples_from_plants_database/Flask-CORS-Example-1/flaskr/__init__.py +++ b/Examples_from_plants_database/Flask-CORS-Example-1/flaskr/__init__.py @@ -15,7 +15,7 @@ def after_request(response): "Access-Control-Allow-Headers", "Content-Type, Authorization" ) response.headers.add( - "Access-Control-Allow-Headers", "GET, POST, PATCH, DELETE, OPTION" + "Access-Control-Allow-Methods", "GET, POST, PATCH, DELETE, OPTION" ) return response