diff --git a/lighthouse-core/driver/gatherers/service-worker.js b/lighthouse-core/driver/gatherers/service-worker.js index fecdd718e0b5..bd5a45087a3e 100644 --- a/lighthouse-core/driver/gatherers/service-worker.js +++ b/lighthouse-core/driver/gatherers/service-worker.js @@ -26,7 +26,8 @@ class ServiceWorker extends Gather { */ static getOrigin(url) { const parsedURL = require('url').parse(url); - return `${parsedURL.protocol}//${parsedURL.hostname}`; + return `${parsedURL.protocol}//${parsedURL.hostname}` + + (parsedURL.port ? `:${parsedURL.port}` : ''); } /**