Visit website with domain, cause Refused to set unsafe header "cookie"
Author: jeange1003Created May 24, 2026Updated Jun 12, 2026
Labelsbugscope:browserneeds:triage
Prerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn't contain the answer to my issue
Environment check
- I'm using the latest
mswversion - I'm using Node.js version 20 or higher
Browsers
Chromium (Chrome, Brave, etc.)
Reproduction repository
https://github.com/jeange1003/msw-test
Reproduction steps
- npm run dev
- Visit the local site via domain, like 'http://my.dev.com', which is configured in host file like '127.0.0.1 my.dev.com'
Current behavior
Error in console: Refused to set unsafe header "cookie"
Expected behavior
No error
Source: mswjs/msw