From 2cd41076da8acd0e8b416eccd9d63c7af25cb2a7 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 11 Nov 2018 15:13:37 +0800 Subject: [PATCH] app: remove json in type regrx --- middleware/template.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/template.js b/middleware/template.js index bdd9cc517..02b4f1b21 100644 --- a/middleware/template.js +++ b/middleware/template.js @@ -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) || ['', ''];