How to log if request is HTTP2?


#1

Hello,

I’m trying to log if a request is HTTP2 or not. So far I’m not seeing that info with the default “option http-log” settings. I know “ssl_fc_alpn” does exist, but can’t figure out for the life of me how to get it into a custom log.

Thanks,
Paul


#2

Got it! Put “%[ssl_fc_alpn]” in your custom log-format.

Example:

log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r %[ssl_fc_alpn]"