Describe the problem/error/question
I made simple API in n8n and it works just fine from Postman. For a simple GET request it returns json.
I have VueJS app which calls this API.
What is the error message (if any)?
Browser blocks this call because it’s running on different domain.
Please share your workflow
It’s basically any webhook response.
What I tried
I’ve tried several Caddyfile variants, for example:
mydomain.com {
reverse_proxy n8n:5678 {
flush_interval -1
}
header /webhook/* {
Access-Control-Allow-Origin https://vuejs-domain.com
Access-Control-Allow-Credentials true
Access-Control-Allow-Methods *
Access-Control-Allow-Headers *
defer
}
}
but with no luck
Information on your n8n setup
- n8n version: 1.59.4
- Database (default: SQLite): sqlite
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker with caddy
- Operating system: ubuntu 22.04 lts