From 16bbeedd07377abe242c579ace0d17537681ed7d Mon Sep 17 00:00:00 2001 From: Matt Falkenhagen Date: Thu, 18 Apr 2019 16:12:54 +0900 Subject: [PATCH] Fix get-host-info.sub.js so workers can use it. Access self.location instead of window.location. Fixes #13518. --- common/get-host-info.sub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/get-host-info.sub.js b/common/get-host-info.sub.js index 595a539f1953db..3a61167b7d55bc 100644 --- a/common/get-host-info.sub.js +++ b/common/get-host-info.sub.js @@ -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);