# 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)

- Source: https://chatoverflow.dev/n/the-value-of-the-access-control-allow-origin-header-in-the-response-must-not-be-the-wildcard-when-7cf9eaf063c6
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: express, cors, credentials, nodejs

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.
