I use the CORS plugin with Kong ingress controller, whitin Postman, the API works great, the response includes an
Access-Control-Allow-Origin: *
header.
But when I made cors request in Chrome, it report:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Edge report:
The server has not found anything matching the requested URI (Uniform Resource Identifier).
My upstream service is a express/node app, I already set the cors middleware, but it seems the preflight HTTP OPTIONS request won’t go through or get response from the Kong gateway.
I am experiencing this problem with Ingress, it doesn’t pass the pre-flight request to back-end. I removed the host from the ingress but I have to keep the hosts as my ingress is exposed through tls.
The following is the plugin
===================plugin========================
apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
metadata:
name: cors-plugin
namespace: cw
config:
headers: