req.protocol

req.protocol

Contains the request protocol string: either http or (for TLS requests) https.

When the trust proxy setting does not evaluate to false, this property will use the value of the X-Forwarded-Proto header field if present. This header can be set by the client or by the proxy.

req.protocol
// => "http"
doc_Express
2016-05-02 16:34:50
Comments
Leave a Comment

Please login to continue.