Files
expressjs.com/_includes/api/en/3x/res-location.md
Douglas Christopher Wilson faa6bb9e0a Apply StandardJS style to API docs
2019-05-26 22:47:09 -04:00

422 B

res.location

Set the location header.

res.location('/foo/bar')
res.location('foo/bar')
res.location('http://example.com')
res.location('../login')
res.location('back')

You can use the same kind of urls as in res.redirect().

For example, if your application is mounted at /blog, the following would set the location header to /blog/admin:

res.location('admin')