Skip to content

Commit

Permalink
Fix get-host-info.sub.js so workers can use it. (#16405)
Browse files Browse the repository at this point in the history
Access self.location instead of window.location. Fixes #13518.
  • Loading branch information
mfalken authored and Marcos Cáceres committed Jul 23, 2019
1 parent 6dfb495 commit 8cf00b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/get-host-info.sub.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function get_host_info() {
var HTTP_PORT = '{{ports[http][0]}}';
var HTTP_PORT2 = '{{ports[http][1]}}';
var HTTPS_PORT = '{{ports[https][0]}}';
var PROTOCOL = window.location.protocol;
var PROTOCOL = self.location.protocol;
var IS_HTTPS = (PROTOCOL == "https:");
var HTTP_PORT_ELIDED = HTTP_PORT == "80" ? "" : (":" + HTTP_PORT);
var HTTP_PORT2_ELIDED = HTTP_PORT2 == "80" ? "" : (":" + HTTP_PORT2);
Expand Down

0 comments on commit 8cf00b9

Please sign in to comment.