Function: getProtocol()
Function: getProtocol()
function getProtocol(
ip,
headers,
encrypted,
options): string;
Get protocol.
Parameters
ip
string
The IP address of the request.
headers
IncomingHttpHeaders
The headers from the incoming request.
encrypted
boolean
Whether the connection is encrypted (HTTPS).
options
Options for trusted and untrusted IPs.
trustedIp
string
[]
untrustedIp
string
[]
Returns
string
The protocol (http or https).