Edit Page
req.hostname
Returns the hostname supplied in the host HTTP header. This header may be set either by the client or by the proxy.
Usage
req.hostname;
Example
If this request's "Host" header was "ww3.staging.ibm.com:1492":
req.hostname;
// -> "ww3.staging.ibm.com"
Is something missing?
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.