Skip to content

Commit

Permalink
Merge pull request #101 from flatfox-ag/host_hash
Browse files Browse the repository at this point in the history
URL cache host part hash
  • Loading branch information
kfiroo authored Oct 24, 2017
2 parents cedebc4 + 1dc2c73 commit 9dfc57f
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 9dfc57f

Please sign in to comment.