How to Restrict CORS to Specific Origin in n8n Webhook Node?

Describe the problem/error/question

I don’t understand how Webhook CORS works.

I want to disallow all origins except for https://example.com.

I tried setting the Allowed Origins (CORS) option to https://example.com, but it still allows requests from other origins.

curl -X POST http://localhost:5678/webhook-test/31f86de7-5292-473d-b728-bb1ab52c5f6e

How can I restrict all origins except for https://example.com?

Please share your workflow

Information on your n8n setup

  • n8n version: 1.42.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Arch Linux

maybe @Jon can help with that

My bad, CORS only works in a browser and doesn’t work with cURL requests. So it’s not an n8n concern.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.