Remove 301
This commit is contained in:
parent
8c9c1f341d
commit
c9185f05ca
@ -144,7 +144,7 @@ exports.goToUrl = async (req, res, next) => {
|
||||
redis.set(id + (domain || ''), JSON.stringify(url), 'EX', 60 * 60 * 1);
|
||||
|
||||
if (url.banned) {
|
||||
return res.redirect(301, '/banned');
|
||||
return res.redirect('/banned');
|
||||
}
|
||||
|
||||
const doesRequestInfo = /.*\+$/gi.test(reqestedId);
|
||||
@ -197,7 +197,7 @@ exports.goToUrl = async (req, res, next) => {
|
||||
.send();
|
||||
}
|
||||
|
||||
return res.redirect(301, url.target);
|
||||
return res.redirect(url.target);
|
||||
};
|
||||
|
||||
exports.getUrls = async ({ query, user }, res) => {
|
||||
|
@ -65,7 +65,7 @@ app.prepare().then(() => {
|
||||
headers.host !== config.DEFAULT_DOMAIN &&
|
||||
(path === '/' || preservedUrls.some(item => item === path.replace('/', '')))
|
||||
) {
|
||||
return res.redirect(301, `http://${config.DEFAULT_DOMAIN + path}`);
|
||||
return res.redirect(`http://${config.DEFAULT_DOMAIN + path}`);
|
||||
}
|
||||
return next();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user