we are getting CORS errors while trying to run smart actions:
Expected behavior
smart action should run
Actual behavior
smart action not working
Failure Logs
Access to XMLHttpRequest at ‘https://backoffice.hectorkitchen.com/forest/actions/duplicate-flash-sale’ from origin ‘https://app.forestadmin.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Context
app.js extract
app.use(cors({
allowedOrigins: [’*.forestadmin.com’],
headers: [‘Authorization’, ‘X-Requested-With’, ‘Content-Type’]
}));