When I make a “curl -I -X OPTIONS https://n8n.mywebsite.com/”, the headers shows correctly, but when I make the same request to a webhook url (https://n8n.mywebsite.com/webhook/test), I don’t get the CORS header, so I can’t make HTTP request to workflows.
Yes sorry, I added that by mistake. It is being received now, but I’m getting this error now:
Access to fetch at 'https://n8n.mywebsite.com/webhook/test' from origin 'https://otherdomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'https://otherdomain.com/, https://otherdomain.com', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Your backend is probably already adding those headers, so you don’t need to do it in Caddy. That’s what it’s saying about there being two headers.