I’m trying to fetch user workflows using Rest Endpoint hosted in our own server. I’m using localhost for development however I’m getting CORS error. Is it possible to use localhost to use n8n endpoints? Or do we need to develop our own API to call n8n endpoint, fetch workflows and return it to the frontend client?
What is the error message (if any)?
CORS error
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
n8n doesn’t have built-in logic avoiding CORS issues, so you’d want to add the required headers outside of n8n itself. Typically on a reverse proxy level as suggested over here for nginx (this topic is about the webhook node, but the basic idea should work for other browser-initiated requests subject to CORS as well of course).
What we currently get is error 204 No Content even if the request is from localhost to localhost (n8n). Is there possibly something that I’ve missed? Thanks!