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

@uppy/utils: do not strip www in getSocketHost #5621

Merged
merged 2 commits into from
Feb 3, 2025
Merged

Conversation

Murderlon
Copy link
Member

Closes #5606

@Murderlon Murderlon self-assigned this Jan 23, 2025
Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/utils/lib/getSocketHost.js b/packages/@uppy/utils/lib/getSocketHost.js
index eff22e4..3479427 100644
--- a/packages/@uppy/utils/lib/getSocketHost.js
+++ b/packages/@uppy/utils/lib/getSocketHost.js
@@ -1,6 +1,6 @@
 export default function getSocketHost(url) {
   var _regex$exec;
-  const regex = /^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i;
+  const regex = /^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?([^\n]+)/i;
   const host = (_regex$exec = regex.exec(url)) == null ? void 0 : _regex$exec[1];
   const socketProtocol = /^http:\/\//i.test(url) ? "ws" : "wss";
   return `${socketProtocol}://${host}`;

@Murderlon Murderlon merged commit 48d0abc into main Feb 3, 2025
16 checks passed
@Murderlon Murderlon deleted the get-socket-host branch February 3, 2025 14:22
github-actions bot added a commit that referenced this pull request Feb 3, 2025
| Package                    | Version | Package                    | Version |
| -------------------------- | ------- | -------------------------- | ------- |
| @uppy/core                 |   4.4.2 | @uppy/provider-views       |   4.4.2 |
| @uppy/google-drive-picker  |   0.3.3 | @uppy/url                  |   4.2.2 |
| @uppy/google-photos-picker |   0.3.3 | @uppy/utils                |   6.1.2 |
| @uppy/locales              |   4.5.1 | uppy                       |  4.13.2 |

- @uppy/utils: do not strip www in getSocketHost (Merlijn Vos / #5621)
- @uppy/url: skip drag/dropped local files (Merlijn Vos / #5626)
- @uppy/provider-views: fix google photos picker videos (Mikael Finstad / #5635)
- @uppy/core,@uppy/google-drive-picker,@uppy/google-photos-picker,@uppy/provider-views:
  fix google picker i18n (Mikael Finstad / #5632)
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.

Function to get socket host is removing www
1 participant