From d4a1b43215eeb51fe10cf832d6d4b3c8183e3770 Mon Sep 17 00:00:00 2001 From: Emerson Rocha Luiz Date: Fri, 7 Jun 2019 02:57:43 -0300 Subject: [PATCH] reverse-proxy-for-free-basics (#62): pagespeed strip_scripts works! This is fantastic --- .../reverse-proxy-for-free-basics/README.md | 3 ++- .../etc/nginx/nginx.conf | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docker/reverse-proxy-for-free-basics/README.md b/docker/reverse-proxy-for-free-basics/README.md index 3c390e0..5a7476a 100644 --- a/docker/reverse-proxy-for-free-basics/README.md +++ b/docker/reverse-proxy-for-free-basics/README.md @@ -6,4 +6,5 @@ content to [Free Basics by Facebook](https://info.internet.org). - See https://github.com/apache/incubator-pagespeed-ngx/tree/master/docker # Apache/incubator-pagespeed-ngx -- \ No newline at end of file +- +- \ No newline at end of file diff --git a/docker/reverse-proxy-for-free-basics/etc/nginx/nginx.conf b/docker/reverse-proxy-for-free-basics/etc/nginx/nginx.conf index 7271761..5f1e4a5 100644 --- a/docker/reverse-proxy-for-free-basics/etc/nginx/nginx.conf +++ b/docker/reverse-proxy-for-free-basics/etc/nginx/nginx.conf @@ -27,5 +27,28 @@ http { #gzip on; + # Is possible to overide these defaults on your virtual hosts + # @see https://www.modpagespeed.com/doc/configuration#virtual-hosts + # pagespeed DisableFilters canonicalize_javascript_libraries, combine_javascript, defer_javascript, inline_javascript, insert_ga, lazyload_images, outline_javascript, rewrite_javascript; + + pagespeed DisableFilters canonicalize_javascript_libraries; + pagespeed DisableFilters combine_javascript; + pagespeed DisableFilters defer_javascript; + pagespeed DisableFilters inline_javascript; + pagespeed DisableFilters insert_ga; + pagespeed DisableFilters lazyload_images; + pagespeed DisableFilters outline_javascript; + pagespeed DisableFilters rewrite_javascript; + + # @todo research impact of OptimizeForBandwidth (fititnt, 2019-06-07 02:11 BRT) + # @see https://www.modpagespeed.com/doc/optimize-for-bandwidth + pagespeed RewriteLevel OptimizeForBandwidth; + + # @todo see Admin page https://www.modpagespeed.com/doc/admin (fititnt, 2019-06-07 02:08 BRT) + + # @todo research about this strip_scripts and make it work (fititnt, 2019-06-07 02:11 BRT) + # @see https://www.modpagespeed.com/doc/filter-strip-scripts + pagespeed EnableFilters strip_scripts; + include /etc/nginx/conf.d/*.conf; } \ No newline at end of file