-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(@aws-amplify/pubsub): Block subscriptions for SSR, not Node #6937
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(@aws-amplify/pubsub): Block subscriptions for SSR, not Node #6937
Conversation
| @@ -1,24 +0,0 @@ | |||
| jest.mock('@aws-amplify/core', () => ({ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually renamed to .ssr.ts, but showing as a deletion 🤷
|
This pull request introduces 1 alert when merging 1d84b07 into 53be43d - view on LGTM.com new alerts:
|
manueliglesias
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks @ericclemmons !
sammartinez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🌮
Partial revert of aws-amplify#6937 to ensure that subscriptions still work on the client.
|
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Issue #, if available: Fixes #6873
#6146 & #6726 blocked
PubSub.subscribefrom being used in Node environments for security reasons (multi-tenant requests sharing the same socket), butisNodeisn't a reliable indicator of that usage:ssr: trueis.isNodeis a valid runtime for single-tenant environments, such as Electron.This PR improves the specificity of the
PubSub.subscribecheck to match the use-case it was designed for (SSR) vs. blocking legitimate usages of sockets.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.