mirror of
https://github.com/expressjs/expressjs.com.git
synced 2026-02-26 02:54:58 +00:00
14 lines
377 B
Plaintext
14 lines
377 B
Plaintext
section
|
|
h3(id='req.protocol') req.protocol
|
|
|
|
p.
|
|
Return the protocol string "http" or "https"
|
|
when requested with TLS. When the "trust proxy"
|
|
setting is enabled the "X-Forwarded-Proto" header
|
|
field will be trusted. If you're running behind
|
|
a reverse proxy that supplies https for you this
|
|
may be enabled.
|
|
|
|
+js.
|
|
req.protocol
|
|
// => "http" |