Skip to content

Commit

Permalink
URL cache host part hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Chrusciel committed Oct 24, 2017
1 parent cedebc4 commit 1dc2c73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/pathUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function getHostCachePathComponent(url) {
const {
host
} = new URL(url);
return host.replace(/[^a-z0-9]/gi, '').toLowerCase();

return host.replace(/\.:/gi, '_').replace(/[^a-z0-9_]/gi, '_').toLowerCase()
+ '_' + SHA1(host);
}

/**
Expand Down

0 comments on commit 1dc2c73

Please sign in to comment.