Allowed Origins (CORS) error

Hi @Steve_Warburton, The CORS (Cross-Origin Resource Sharing) issue you are facing is due to the fact that the Access-Control-Allow-Origin header is either missing or incorrectly configured in your webhook response.

It looks like you’ve already set the CORS value (ACCESS_CONTROL_ALLOW_ORIGIN), but it might be misconfigured. In your n8n .env file or when running n8n, make sure you set:

N8N_DEFAULT_CORS=TRUE
N8N_CORS_ALLOW_ORIGIN=https://mywebsite.co.uk

Be sure to restart n8n.

If you are using NGINX as a reverse proxy, you can configure it to add CORS headers:

location /webhook/ {
    proxy_pass http://localhost:5678;
    add_header 'Access-Control-Allow-Origin' 'https://mywebsite.co.uk' always;
    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
    add_header 'Access-Control-Allow-Headers' 'Content-Type' always;
}

Then reload NGINX.

1 Like