The usual recommended upgrade is to use some add-on tool like NGINX.
Thanks for your feedback.
I wanted to avoid configuring nginx auth because I’m currently using an nginx config on my NAS Synology and I read here and there that configuring auth on the NAS was complicated.
But, thinking twice about it after your comment, I simply installed an nginx on my openhab server, and quickly configured auth on it, making the following HTTP flow working :
=(my-sub-domain:443)=> nginx (on NAS)
=(my-openhab-server-internal-ip:80)=> nginx (on openhab server) with BASIC auth
=(localhost:8080)=> openhab2```