app: remove json in type regrx

This commit is contained in:
DIYgod
2018-11-11 15:13:37 +08:00
parent ca4f709f0e
commit 2cd41076da
+1 -1
View File
@@ -2,7 +2,7 @@ const art = require('art-template');
const path = require('path');
const config = require('../config');
const he = require('he');
const typeRegrx = /\.(atom|rss|json)$/;
const typeRegrx = /\.(atom|rss)$/;
module.exports = async (ctx, next) => {
ctx.state.type = ctx.request.path.match(typeRegrx) || ['', ''];