Skip to content

Commit

Permalink
Handles ports for SW.
Browse files Browse the repository at this point in the history
SW check needs ports.

Fixes #532
  • Loading branch information
paullewis committed Jul 27, 2016
1 parent cc3cca4 commit 1f08aa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lighthouse-core/driver/gatherers/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}` : '';
}

/**
Expand Down

0 comments on commit 1f08aa0

Please sign in to comment.