Skip to content

Commit 1dc2c73

Browse files
author
Artur Chrusciel
committed
URL cache host part hash
1 parent cedebc4 commit 1dc2c73

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)