res.location()
將 "Location" 回應標頭設定為指定的 URL 表達式 (url
)。
res.location(url);
res.location('/foo/bar');
res.location('foo/bar');
res.location('http://example.com');
res.location('../login');
res.location('back');
- 您可以使用與
res.redirect()
中相同的 URL 表達式。