Use single quotes :P
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const createSearch = require("../utils/createSearch");
|
||||
const createSearch = require('../utils/createSearch');
|
||||
|
||||
/**
|
||||
* Redirect old URLs that we no longer support.
|
||||
@ -6,14 +6,14 @@ const createSearch = require("../utils/createSearch");
|
||||
function redirectLegacyURLs(req, res, next) {
|
||||
// Permanently redirect /_meta/path to /path?meta.
|
||||
if (req.path.match(/^\/_meta\//)) {
|
||||
req.query.meta = "";
|
||||
req.query.meta = '';
|
||||
return res.redirect(301, req.path.substr(6) + createSearch(req.query));
|
||||
}
|
||||
|
||||
// Permanently redirect /path?json => /path?meta
|
||||
if (req.query.json != null) {
|
||||
delete req.query.json;
|
||||
req.query.meta = "";
|
||||
req.query.meta = '';
|
||||
return res.redirect(301, req.path + createSearch(req.query));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user