I created a webhook trigger according to these instructions and am trying to send a POST request from my React application with JSON data I’ll then use in the automation. I’m getting this error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://hooks.nabu.casa/xxx. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
This is after adding the following to my configuration.yaml:
http:
cors_allowed_origins:
- http://localhost:3000
I understand that the issue here is the preflight OPTIONS request my browser sends, as I’m using the Fetch API - I can successfully trigger the automation using Postman, which doesn’t send the preflight request. Has anyone figured out a way to work around this?