Issue with setting CORS headers using CORS plugin #9217
novicejava1
started this conversation in
General
Replies: 2 comments
-
i hit this same issue, seems nobody take attention on it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
i resolve this problem in my case for detail #11218 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team,
I am trying to use the CORS plugin to set the HTTP headers for the backend flask based application. Here are the steps that i am following.
1. Start Flask based application
Here is my basic flask application listing on port 2121 and accepts POST method.
2. Create Route with CORS enabled
Here i am creating a route with CORS plugin to allow_origins and allow_methods attribute set as shown below.
3. Test CORS
Sample JSON data
Expected Behaviour
As per the CORS attributes set, ideally the below POST request with "Origin" header set to a value other than the allowed origins should reject this request. But the actual behaviour is as shown below.
Actual Behaviour
CORS Test with Origin set to http://stack.com:9080 allows to access the backend flask based application.
Kindly let me know if my understanding is correct in this respect and let me know if this a bug which could be reported.
Beta Was this translation helpful? Give feedback.
All reactions