All JSON files served from ionic endpoints
This commit is contained in:
parent
b37faa87b3
commit
8188e06c76
@ -24,7 +24,7 @@ class IonicUnit extends Unit {
|
|||||||
app.express.use('/i', [
|
app.express.use('/i', [
|
||||||
this.canon.get('middleware::auth:UserOnly'),
|
this.canon.get('middleware::auth:UserOnly'),
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
const allowed_extensions = ['.html', '.js', '.css', '.svg', '.ttf', '.jpg', '.png', '.jpeg', '.webmanifest']
|
const allowed_extensions = ['.html', '.js', '.css', '.svg', '.ttf', '.jpg', '.png', '.jpeg', '.webmanifest', '.json']
|
||||||
for ( const k1 in allowed_extensions ) {
|
for ( const k1 in allowed_extensions ) {
|
||||||
if ( req.path.endsWith(allowed_extensions[k1]) ) return next()
|
if ( req.path.endsWith(allowed_extensions[k1]) ) return next()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user