Stone.js API
    Preparing search index...
    • 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: { trustedIp: string[]; untrustedIp: string[] }

        Options for trusted and untrusted IPs.

      Returns string

      The protocol (http or https).