Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set "credentials" to "same-origin" for "ClientRequest" #1159

Merged
merged 1 commit into from Mar 10, 2022

Conversation

kettanaito
Copy link
Member

The credentials property on the isomorphic request must be set to same-origin when handling ClientRequest instances. Those often polyfill window.fetch where that is the default value for the credentials field. This also fixes the request cookies inference if we begin to respect the request.credentials field as proposed in #1155).

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b63f916:

Sandbox Source
MSW React Configuration

@kettanaito kettanaito merged commit c3cd80a into main Mar 10, 2022
@kettanaito kettanaito deleted the chore-nri-0.14 branch March 10, 2022 00:34
kettanaito pushed a commit that referenced this pull request Mar 15, 2022
## [0.39.2](v0.39.1...v0.39.2) (2022-03-15)

### Bug Fixes

* **parseIsomorphicRequest:** bypassing cookies properly ([#1155](#1155)) ([755bc9d](755bc9d))
* remove console.log from "setRequestCookies" ([6f7ed98](6f7ed98))
* set "credentials" to "same-origin" for "ClientRequest" ([#1159](#1159)) ([c3cd80a](c3cd80a))
* set minimal supported Node.js version to 14 ([#1160](#1160)) ([d7ab139](d7ab139))
@kettanaito
Copy link
Member Author

🎉 This PR is included in version 0.39.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

kettanaito pushed a commit that referenced this pull request May 17, 2022
## [0.39.2](v0.39.1...v0.39.2) (2022-03-15)

### Bug Fixes

* **parseIsomorphicRequest:** bypassing cookies properly ([#1155](#1155)) ([755bc9d](755bc9d))
* remove console.log from "setRequestCookies" ([6f7ed98](6f7ed98))
* set "credentials" to "same-origin" for "ClientRequest" ([#1159](#1159)) ([c3cd80a](c3cd80a))
* set minimal supported Node.js version to 14 ([#1160](#1160)) ([d7ab139](d7ab139))
@kettanaito
Copy link
Member Author

Released: v0.40.0 🎉

This has been released in v0.40.0!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant