Connection from client refused with CORS enabled #4401
-
My connection from client to server is forbidden with CORS enabled on server. The returned message is: I checked following two issues, but didn't find the answer:
Here the server:
Here's the client:
When I uncomment the allowRequest part on the server, the connection works. Also, with following curl command, I get a perfect 200 OK, followed by a 403 Forbidden: Here's a part of the output:
As you can see my local SSL certificate is not valid. Could that be an issue? I'm using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi! The
Could you please explain your use case? Also, I think the |
Beta Was this translation helpful? Give feedback.
Hi! The
allowRequest
function above only allows requests withoutorigin
header, which should explain the issue:Could you please explain your use case?
Also, I think the
extraHeaders
on the client side are not necessary (the browser takes care of the preflight requests).