gzip on;
gzip_proxied any;
gzip_vary on;
gzip_types application/ecmascript;
gzip_types application/javascript;
gzip_types application/json;
gzip_types application/pdf;
gzip_types application/postscript;
gzip_types application/x-javascript;
gzip_types image/svg+xml;
gzip_types text/css;
gzip_types text/csv;
gzip_types text/html;
gzip_types text/javascript;
gzip_types text/plain;
gzip_types text/xml;
gzip_http_version 1.0;
If any explicit gzip configuration is detected the gzip configuration
set by pagespeed is rolled back completely and the explicit gzip
configuration is used.
To enable/disable gzip with pagespeed the following commands can be used:
pagespeed gzip on;
pagespeed gzip off;
We test the nesting of the gzip configuration (pagespeed gzip on/off and
pagespeed on/off)
Ideally we need to test all the content types as well and the rollback in
case of an explicit gzip configuration, but to do this we need to be able
to map a custom directory into the nginx tests this and seperate nginx
config files.
Fixes https://github.com/pagespeed/ngx_pagespeed/issues/238
gzip on;
gzip_proxied any;
gzip_vary on;
gzip_types application/ecmascript;
gzip_types application/javascript;
gzip_types application/json;
gzip_types application/pdf;
gzip_types application/postscript;
gzip_types application/x-javascript;
gzip_types image/svg+xml;
gzip_types text/css;
gzip_types text/csv;
gzip_types text/html;
gzip_types text/javascript;
gzip_types text/plain;
gzip_types text/xml;
gzip_http_version 1.0;
If any explicit gzip configuration is detected the gzip configuration
set by pagespeed is rolled back completely and the explicit gzip
configuration is used.
To enable/disable gzip with pagespeed the following commands can be used:
pagespeed gzip on;
pagespeed gzip off;
this adds the following configuration on "pagespeed on"
gzip on;
gzip_proxied any;
gzip_vary on;
gzip_types application/ecmascript;
gzip_types application/javascript;
gzip_types application/json;
gzip_types application/pdf;
gzip_types application/postscript;
gzip_types application/x-javascript;
gzip_types image/svg+xml;
gzip_types text/css;
gzip_types text/csv;
gzip_types text/html;
gzip_types text/javascript;
gzip_types text/plain;
gzip_types text/xml;
gzip_http_version 1.0;
If an explicit configuration is detected the gzip configuration
set by pagespeed on is rollbacked
Fixes https://github.com/pagespeed/ngx_pagespeed/issues/238
As suggested by Anupama, deflake the test by only allowing beaconing
when explitly requested by http request from tests.
Html with beacons in it will bypass the proxy cache.
- Fix a mistake I made in https://github.com/pagespeed/ngx_pagespeed/pull/653
This is the primary reason the test starts failing, the base fetch
handled `kPreserveOnlyCacheControl` in the wrong way.
- Use `ps_set_cache_control` when copying a Cache-Control header
to nginx, as `r->headers_out.cache_control` is where modules running
after us might expect it
- Exclude a few more lines from curl's verbose output in the keep-
alive tests that I came accross when testing on ubuntu 13.10
Desktop.
Note that this does not deflake the downstream cache test yet, I will
look at that in a follow-up.