CORS Error

Hi, i have been use a webhook for a post request. But the app (UI Bakery made) gives me these error:

0 Unknown Error. This could be a CORS issue - try configuring your server to allow requests https://enable-cors.org/server.html

Access Control Allow Header is set.

What can it be ?

Thanks,
Stefan

Hey @Stefan,

When others have run into this in the past, the solution was to run everything behind a proxy, which, in my opinion, is the right way to do this anyway. You are simply asking for trouble if you are running n8n “naked” on the internet.

Ok ? I use your Docker Version, this runs behind a proxy ? Right ?

If you run n8n with docker then there will just be n8n and no proxy.

If you use run n8n as described in our Server Setup Guide then there will be a proxy in front of it. In this case traefik.

About your CORS issue. Did you try to make a request with curl to see if the Access Control Allow Header gets returned correctly? What value did you set?

Here an earlier discussion about CORS:

Jan, when you use the Docker Version. You need this parameter in Docker Compose

traefik.frontend.headers.customResponseHeaders=Access-Control-Allow-Origin:*

Then it works !

Thanks,
Stefan

Interesting. But it should also work if you set it as a response header an the Webhook-Node. At least in our setup it is working fine. Can not imagine that traefik would remove that.