Skip to content

Commit 14003f5

Browse files
committed
Update v1.0.1
1 parent f5ab906 commit 14003f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ app.use(express.static(path.join(__dirname, 'public')));
2424

2525
// set response header
2626
app.use(function(req, res, next) {
27-
if (req.path.endsWith('.json')) {
27+
if (path.extname(req.path) == '.json') {
2828
res.setHeader('Content-Type', 'application/json');
2929
}
3030
next();

0 commit comments

Comments
 (0)