You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(client): don't override protocol for socket connection to 127.0.0.1 (#2303)
Chrome and Firefox accept `http://`/`ws://` mixed-content connection to
`127.0.0.1` even when the actual website is loaded via `https://`.
Fixes#2302
Copy file name to clipboardExpand all lines: test/client/utils/__snapshots__/createSocketUrl.test.js.snap
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ exports[`createSocketUrl should return the url when __resourceQuery is ?test 1`]
4
4
5
5
exports[`createSocketUrl should return the url when __resourceQuery is http://0.0.0.0 1`] =`"http://localhost/sockjs-node"`;
6
6
7
+
exports[`createSocketUrl should return the url when __resourceQuery is http://127.0.0.1 1`] =`"http://127.0.0.1/sockjs-node"`;
8
+
7
9
exports[`createSocketUrl should return the url when __resourceQuery is http://user:pass@[::]:8080 1`] =`"http://user:pass@localhost:8080/sockjs-node"`;
8
10
9
11
exports[`createSocketUrl should return the url when __resourceQuery is http://user:password@localhost/ 1`] =`"http://user:password@localhost/sockjs-node"`;
@@ -22,6 +24,8 @@ exports[`createSocketUrl should return the url when the current script source is
22
24
23
25
exports[`createSocketUrl should return the url when the current script source is http://0.0.0.0 1`] =`"http://localhost/sockjs-node"`;
24
26
27
+
exports[`createSocketUrl should return the url when the current script source is http://127.0.0.1 1`] =`"http://127.0.0.1/sockjs-node"`;
28
+
25
29
exports[`createSocketUrl should return the url when the current script source is http://user:pass@[::]:8080 1`] =`"http://user:pass@localhost:8080/sockjs-node"`;
26
30
27
31
exports[`createSocketUrl should return the url when the current script source is http://user:password@localhost/ 1`] =`"http://user:password@localhost/sockjs-node"`;
0 commit comments