Edit Page

req.host

This method is deprecated and will likely be removed or changed in an upcoming release.

Instead, use req.hostname.

The hostname of this request, without the port number, as specified by its "Host" header.

Usage

req.host;

Example

If this request's "Host" header was "ww3.staging.ibm.com:1492":

req.host;
// -> "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.

Check out the official Sails VS Code extension

Documentation

Reference

Sails logo

Reference

AltStyle によって変換されたページ (->オリジナル) /