Hai, Getting cors error Access to fetch at 'https:...
# support-questions
n
Hai, Getting cors error Access to fetch at 'https://dev-designer-api.pixelandmortar.com/v1/designer/session/refresh' from origin 'https://dev-designer.pixelandmortar.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
r
hey @nandhini wildcards won't work with cookies. Please explicitly set allowed origin in cors setting
n
you mean this app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); next(); });
r
yea. Ideally use the cors middleware library
it's in our docs - backend setup
n
Thanks will check