Protocol Related Primitives

July 31, 2026 ยท View on GitHub

req_proto_match(proto)

  • Description: Judge if request protocol matches configured protocols

  • Parameters

ParameterDescription
protoString
a list of protocol names which are concatenated using |
e.g. "https", "http", "spdy/3.1", "h2"
  • Example
req_proto_match("https|h2")

req_proto_secure()

  • Description: Judge if request is over TLS protocol(ie. HTTPS/SPDY/HTTP2)