fix: force download of unsafe extensions
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user