Skip to content

Commit

Permalink
Merge pull request #468 from tino/properly-escaped-contenttype-regex
Browse files Browse the repository at this point in the history
Fix the regex of the example proxy.gzip.contenttype
  • Loading branch information
magiconair authored Mar 18, 2018
2 parents e329e31 + bcd66de commit 029e660
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions config/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,13 @@ func TestLoad(t *testing.T) {
return cfg
},
},
{
args: []string{"-proxy.gzip.contenttype", "^(text/.*|application/(javascript|json|font-woff|xml)|.*\\+(json|xml))(;.*)?$"},
cfg: func(cfg *Config) *Config {
cfg.Proxy.GZIPContentTypes = regexp.MustCompile(`^(text/.*|application/(javascript|json|font-woff|xml)|.*\+(json|xml))(;.*)?$`)
return cfg
},
},
{
args: []string{"-proxy.log.routes", "foobar"},
cfg: func(cfg *Config) *Config {
Expand Down
2 changes: 1 addition & 1 deletion fabio.properties
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
#
# A typical example is
#
# proxy.gzip.contenttype = ^(text/.*|application/(javascript|json|font-woff|xml)|.*\+(json|xml))(;.*)?$
# proxy.gzip.contenttype = ^(text/.*|application/(javascript|json|font-woff|xml)|.*\\+(json|xml))(;.*)?$
#
# The default is
#
Expand Down

0 comments on commit 029e660

Please sign in to comment.