ring

2024-05-09T13:13:37.848399Z

Does ring jetty support http 2 and if so how do you enable it?

2024-05-09T13:16:29.947549Z

For one of my sites lighthouse is complaining about the use of http 1.1 so i'm just curious if there is an easy fix for that.

2024-05-09T13:26:12.372049Z

I found the issue it was nginx that was not using http2 I changed that and it worked nvm.

weavejester 2024-05-09T14:15:23.854229Z

No, not yet, but https://github.com/sunng87/ring-jetty9-adapter does, I believe. However, most of the time Ring Jetty will be running behind a load balancer or some kind of reverse proxy like nginx that will support HTTP2.

2024-05-09T14:17:26.349349Z

Yeah that is the case in my setup so nginx now does http2 and then proxies requests to jetty via http 1.1. Thanks for the link I will check that out as well

weavejester 2024-05-09T14:18:26.815209Z

It's worth noting that nginx doesn't support HTTP2 on the server it proxies to, so even if Ring Jetty had HTTP2, nginx wouldn't be able to use it.

weavejester 2024-05-09T14:19:43.489509Z

See: https://trac.nginx.org/nginx/ticket/923

2024-05-09T14:26:43.933089Z

Ok thanks the main thing for us was configuring nginx to use http2 for the external requests, that significantly increased all our lighthouse scores.