Add more extensions to Ionic endpoint
This commit is contained in:
parent
8188e06c76
commit
677f5fa2de
@ -24,7 +24,12 @@ class IonicUnit extends Unit {
|
||||
app.express.use('/i', [
|
||||
this.canon.get('middleware::auth:UserOnly'),
|
||||
(req, res, next) => {
|
||||
const allowed_extensions = ['.html', '.js', '.css', '.svg', '.ttf', '.jpg', '.png', '.jpeg', '.webmanifest', '.json']
|
||||
const allowed_extensions = [
|
||||
'.html', '.js', '.css', '.svg', '.ttf', '.jpg', '.png',
|
||||
'.jpeg', '.webmanifest', '.json', '.eot', '.svg', '.cur',
|
||||
'.webp', '.gif', '.otf', '.woff', '.woff2', '.ani', '.map',
|
||||
'.ico',
|
||||
]
|
||||
for ( const k1 in allowed_extensions ) {
|
||||
if ( req.path.endsWith(allowed_extensions[k1]) ) return next()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user