Every line of 'res redirect' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
24 function redirect(res, location) { 25 res.end(getHeader(302, 'Location: ' + location + '\r\n')); 26 }
6 redirect(req, res) { 7 res.redirect("/test/redirectTo"); 8 }
17 function redirect (req, res) { 18 const path = req.params.path || '' 19 const url = config.settingsUrl + (path ? '/' + path : '') 20 res.redirect(url) 21 }
18 router.get(/^\/signup\/$/, function redirect(req, res) { 19 /*jslint unparam:true*/ 20 res.set({'Cache-Control': 'public, max-age=' + utils.ONE_YEAR_S}); 21 res.redirect(301, subdir + '/ghost/signup/'); 22 });
78 redirect(url = '/', options = {}) { 79 this._response.redirect(url, options.httpStatus || 302); 80 }
24 export function _send__302(res) { 25 res.writeHead(302, { Location: '/auth/password/reset' }) 26 res.end('') 27 }