[nginx] Add support for gzip
Created by: nemesisdesign
We need these options to be added to nginx:
gzip on;
gzip_comp_level 6;
gzip_proxied any;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/html image/svg+xml application/json application/javascript text/xml text/css application/xml application/x-font-ttf font/opentype;
They need to be configurable (so it can be also turned off and details may be changed.
I think we can use this chance to add a generic mechanism to add configuration variable to nginx (which will contain the default gzip values too), eg:
openwisp2_nginx_ssl_config:
gzip: on
gzip_comp_level 6
# etc
The variables of openwisp2_nginx_ssl_config will be added only to the :443
section of the nginx configuration.