Prerequisites
Environment check
Node.js version
20.17.0
Reproduction repository
https://github.com/aristofun/bugs-js-msw
Reproduction steps
Minimal example: https://github.com/aristofun/bugs-js-msw
Change the msw version to 2.4.3 reinstall and yarn start to see the difference.
Current behavior
After mswServer.listen({ onUnhandledRequest: "bypass" }); all localhost requests issued by axios in the same process are stripped off all cookie headers.
Reproduced on all msw versions starting with 2.4.4
Explicitly adding cookie header like this:
const result2 = await axios.post("/mypath", {}, { headers: { 'Cookie': 'key=value' } });
Works. That means the problem is with interference with axios-cookiejar-support
Expected behavior
mswServer.listen({ onUnhandledRequest: "bypass" }); should not interfere with axios-cookiejar-support
Prerequisites
Environment check
mswversionNode.js version
20.17.0
Reproduction repository
https://github.com/aristofun/bugs-js-msw
Reproduction steps
Minimal example: https://github.com/aristofun/bugs-js-msw
Change the msw version to 2.4.3 reinstall and
yarn startto see the difference.Current behavior
After
mswServer.listen({ onUnhandledRequest: "bypass" });all localhost requests issued byaxiosin the same process are stripped off all cookie headers.Reproduced on all msw versions starting with
2.4.4Explicitly adding cookie header like this:
Works. That means the problem is with interference with
axios-cookiejar-supportExpected behavior
mswServer.listen({ onUnhandledRequest: "bypass" });should not interfere withaxios-cookiejar-support