mercredi 26 décembre 2018

Enable http2 in nginx only for some clients

I have two set of users using okhttp/2.7.0 and okhttp/3.12.0. I want to enable http2 in nginx only for those users who are using okhttp/3.12.0. The client ensures to send their identifier. Is there a way to use this information and enable http2 only for those users.

Note: Multiple ports is not an option for me.

My nginx and OS version

nginx version: nginx/1.14.2                                                                                                                                                                                                                  
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4)                                                                                                                                                                                           
built with OpenSSL 1.0.2h  3 May 2016                                                                                                                                                                                                        
TLS SNI support enabled  

My nginx conf goes like this

server {
    listen 443 ssl http2;
    ...




Aucun commentaire:

Enregistrer un commentaire