Smart actions not working after deployment

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’]
}));

Hi @carosatig :wave:

It looks like you are running on v3 of our liana.

Looking at our upgrade note, CORS configuration should be declared as follow:

var express = require('express');
var cors = require('cors');

var app = express();

// ...

app.use(cors({
  origin: [/\.forestadmin\.com$/],
  allowedHeaders: ['Authorization', 'X-Requested-With', 'Content-Type'],
  credentials: true
}));

// ...

module.exports = app;

Adding credentials: true should help