You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/08/08 17:08:53 UTC

[trafficserver] branch 8.0.x updated: Cleans up README and sample config for compress plugin

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 29e3462  Cleans up README and sample config for compress plugin
29e3462 is described below

commit 29e34623d789fe21da445f0fdc5ee91777365257
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Mon Aug 6 09:46:31 2018 -0700

    Cleans up README and sample config for compress plugin
    
    Removes the duplicated sample config and configuration option documentation
    in README.
    
    (cherry picked from commit a5e1ff18c02585e4b1329ebdf0c44e56ff6d574b)
---
 plugins/compress/README                 | 57 ++-------------------------------
 plugins/compress/sample.compress.config | 13 +++++---
 2 files changed, 11 insertions(+), 59 deletions(-)

diff --git a/plugins/compress/README b/plugins/compress/README
index 279de7e..797ea58 100644
--- a/plugins/compress/README
+++ b/plugins/compress/README
@@ -2,7 +2,7 @@ What this plugin does:
 
 =====================
 this plugin compresses responses, via gzip or brotli, whichever is applicable
-it can compress origin respones as well as cached responses
+it can compress origin responses as well as cached responses
 
 installation:
 make && sudo make install
@@ -22,60 +22,9 @@ in this case, the plugin will use a default behaviour:
 - no urls are disallowed from compression
 
 alternatively, a configuration can also be specified:
-compress.so <path-to-plugin>/sample.compress.config
+compress.so <path-to-config>/sample.compress.config
 
 after modifying plugin.config, restart traffic server (sudo traffic_ctl server restart)
 the configuration is re-read when a management update is given (sudo traffic_ctl config reload)
 
-a sample configuration (sample.compress.config):
-
-######################################################################
-#flags and options are:
-#
-# enable-gzip: default true, set true/false to enable/disable plugin for specific host
-#
-# remove-accept-encoding: this sets if the plugin should hide the accept encoding from origin servers
-# - to ease the load on the origins
-# - for when the proxy parses responses, and the resulting compression/decompression
-#   is wastefull
-#
-# cache: when set, the plugin stores the uncompressed and compressed response as alternates
-#
-# compressible-content-type: wildcard pattern for matching compressible content types
-#
-# allow: wildcard pattern for enabling compression on urls. prefix with ! to exclude from compression
-#
-# supported-algorithms: compression algorithms supported. comma separated algorithms. Default is gzip
-#
-######################################################################
-
-#first, we configure the default/global plugin behaviour
-enabled true
-remove-accept-encoding true
-cache false
-
-compressible-content-type text/*
-compressible-content-type *javascript*
-#disabling is possible too
-compressible-content-type !text/javascript
-
-allow */here/*
-#disabling is possible too
-allow !*/nothere/*
-
-#supported algorithms
-supported-algorithms br,gzip
-
-#override the global configuration for a host.
-#www.foo.nl does NOT inherit anything
-[www.foo.nl]
-enabled true
-remove-accept-encoding true
-compressible-content-type text/*
-
-cache false
-allow !/notthis/*.js
-allow !/notthat*
-
-allow /this/*.js
-allow !/notthat/*.css
+See sample.config.compress for an example configuration and the options that are available
diff --git a/plugins/compress/sample.compress.config b/plugins/compress/sample.compress.config
index 61151a4..b1431a9 100644
--- a/plugins/compress/sample.compress.config
+++ b/plugins/compress/sample.compress.config
@@ -23,7 +23,7 @@
 # remove-accept-encoding: this sets if the plugin should hide the accept encoding from origin servers
 # - to ease the load on the origins
 # - for when the proxy parses responses, and the resulting compression/decompression
-#   is wastefull
+#   is wasteful
 #
 # cache: when set, the plugin stores the uncompressed and compressed response as alternates
 #
@@ -46,25 +46,28 @@ cache false
 
 compressible-content-type text/*
 compressible-content-type *javascript*
+#disabling is possible too
+compressible-content-type !text/javascript
+
 compressible-status-code 200
 allow !/notthis/*.js
 allow !/notthat*
 allow !*/bla*
 
 minimum-content-length 1024
+#supported algorithms
+supported-algorithms br,gzip
 
 #override the global configuration for a host.
 #www.foo.nl does NOT inherit anything
 [www.foo.nl]
 enabled true
+cache true
 remove-accept-encoding true
 compressible-content-type text/*
-#disable a content type
-compressible-content-type !text/javascript
-
 compressible-status-code 200,206,409
 minimum-content-length 1024
 
-cache false
 allow /this/*.js
+allow !/notthis/*.js
 allow !/notthat*