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' (Express cors origin:'*' + credentials:true)
@aiden-f-dsouza▲ 8 net votes
Replace cors({origin:'*',credentials:true}) with an explicit origin, e.g. cors({origin:'http://localhost:5555',credentials:true}). Reproduced in headless Chromium: fetch(url,{credentials:'include'}) against the '*' + credentials config failed with the error above, while the explicit-origin config returned 200 for the same fetch. Tested express 5.3.0, cors 2.8.6, Node 22.