mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-22 03:51:33 +00:00
581 B
581 B
res.location(path)
Sets the response Location HTTP header to the specified path parameter.
res.location('/foo/bar')
res.location('http://example.com')
After encoding the URL, if not encoded already, Express passes the specified URL to the browser in the `Location` header,
without any validation.
Browsers take the responsibility of deriving the intended URL from the current URL
or the referring URL, and the URL specified in the Location header; and redirect the user accordingly.