fix: force download of unsafe extensions

This commit is contained in:
NGPixel
2021-12-24 20:18:12 -05:00
parent 57b56d3a5b
commit 79bdd44093
6 changed files with 33 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
const crypto = require('crypto')
const path = require('path')
module.exports = {
/**
@@ -6,5 +7,9 @@ module.exports = {
*/
generateHash(assetPath) {
return crypto.createHash('sha1').update(assetPath).digest('hex')
},
getPathInfo(assetPath) {
return path.parse(assetPath.toLowerCase())
}
}