Skip to content

Commit 9dfc57f

Browse files
authored
Merge pull request #101 from flatfox-ag/host_hash
URL cache host part hash
2 parents cedebc4 + 1dc2c73 commit 9dfc57f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/pathUtils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ function getHostCachePathComponent(url) {
4545
const {
4646
host
4747
} = new URL(url);
48-
return host.replace(/[^a-z0-9]/gi, '').toLowerCase();
48+
49+
return host.replace(/\.:/gi, '_').replace(/[^a-z0-9_]/gi, '_').toLowerCase()
50+
+ '_' + SHA1(host);
4951
}
5052

5153
/**

0 commit comments

Comments
 (0)