Skip to content

Commit

Permalink
PREAPPS-5939 Enable brotli compression
Browse files Browse the repository at this point in the history
- Modern UI uses build time compression, so ignore it from runtime compression logic
  • Loading branch information
silentsakky committed Apr 8, 2021
1 parent b35e10d commit 9a3589d
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 8 deletions.
6 changes: 6 additions & 0 deletions conf/jetty/jetty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,12 @@
<Item>POST</Item>
</Array>
</Set>
<!-- Modern UI uses build time compression -->
<Set name="excludedPaths">
<Array type="String">
<Item>/modern/*</Item>
</Array>
</Set>
</New>
</Set>

Expand Down
7 changes: 7 additions & 0 deletions conf/jetty/jetty.xml.production
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,13 @@
<Item>POST</Item>
</Array>
</Set>

<!-- Modern UI uses build time compression -->
<Set name="excludedPaths">
<Array type="String">
<Item>/modern/*</Item>
</Array>
</Set>
</New>
</Set>
%%comment VAR:zimbraHttpCompressionEnabled,<!--%% HTTPCOMPRESSIONEND -->
Expand Down
46 changes: 42 additions & 4 deletions conf/jetty/webdefault.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,53 @@
<!-- -->
<!-- dirAllowed If true, directory listings are returned if no -->
<!-- welcome file is found. Else 403 Forbidden. -->
<!-- welcomeServlets If true, attempt to dispatch to welcome files -->
<!-- that are servlets, but only after no matching -->
<!-- static resources could be found. If false, -->
<!-- then a welcome file must exist on disk. -->
<!-- If "exact", then exact servlet matches -->
<!-- are supported without an existing file. -->
<!-- Default is false. -->
<!-- -->
<!-- This must be false if you want directory listings,-->
<!-- but have index.jsp in your welcome file list. -->
<!-- -->
<!-- redirectWelcome If true, redirect welcome file requests -->
<!-- else use request dispatcher forwards -->
<!-- -->
<!-- gzip If set to true, then static content will be served-->
<!-- as gzip content encoded if a matching resource is -->
<!-- found ending with ".gz" -->
<!-- gzip If set to true, then static content will be served as -->
<!-- gzip content encoded if a matching resource is -->
<!-- found ending with ".gz" (default false) -->
<!-- (deprecated: use precompressed) -->
<!-- -->
<!-- precompressed If set to a comma separated list of encoding types-->
<!-- (that may be listed in a requests Accept-Encoding -->
<!-- header) to file extension mappings to look for -->
<!-- and serve. For example: "br=.br,gzip=.gz,bzip2=.bz". -->
<!-- If set to a boolean True, then a default set of -->
<!-- compressed formats will be used, otherwise -->
<!-- no precompressed formats. -->
<!-- -->
<!-- resoureBase Can be set to replace the context resource base -->
<!-- -->
<!-- resourceCache If set, this is a context attribute name, -->
<!-- which the servlet will use to look for a shared -->
<!-- ResourceCache instance. -->
<!-- -->
<!-- relativeResourceBase -->
<!-- Set with a pathname relative to the base of the -->
<!-- servlet context root. Useful for only serving -->
<!-- static content from only specific subdirectories. -->
<!-- -->
<!-- pathInfoOnly If true, only the path info will be applied -->
<!-- to the resourceBase -->
<!-- -->
<!-- stylesheet Set with the location of an optional stylesheet -->
<!-- that will be used to decorate the directory -->
<!-- listing html. -->
<!-- -->
<!-- etags If True, weak etags will be generated and handled.-->
<!-- -->
<!-- useFileMappedBuffer -->
<!-- If set to true (the default), a memory mapped -->
<!-- file buffer will be used to serve static content -->
Expand All @@ -97,6 +129,12 @@
<!-- of resource cache. A bio cached buffer may be used-->
<!-- by nio but is not as efficient as a nio buffer. -->
<!-- An nio cached buffer may not be used by bio. -->
<!-- otherGzipFileExtensions -->
<!-- Other file extensions that signify that a file is -->
<!-- already compressed. Eg ".svgz" -->
<!-- -->
<!-- encodingHeaderCacheSize -->
<!-- Max entries in a cache of ACCEPT-ENCODING headers.-->
<!-- -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet>
Expand Down Expand Up @@ -131,7 +169,7 @@
<param-value>both</param-value>
</init-param>
<init-param>
<param-name>gzip</param-name>
<param-name>precompressed</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
Expand Down
46 changes: 42 additions & 4 deletions conf/jetty/webdefault.xml.production
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,53 @@
<!-- -->
<!-- dirAllowed If true, directory listings are returned if no -->
<!-- welcome file is found. Else 403 Forbidden. -->
<!-- welcomeServlets If true, attempt to dispatch to welcome files -->
<!-- that are servlets, but only after no matching -->
<!-- static resources could be found. If false, -->
<!-- then a welcome file must exist on disk. -->
<!-- If "exact", then exact servlet matches -->
<!-- are supported without an existing file. -->
<!-- Default is false. -->
<!-- -->
<!-- This must be false if you want directory listings,-->
<!-- but have index.jsp in your welcome file list. -->
<!-- -->
<!-- redirectWelcome If true, redirect welcome file requests -->
<!-- else use request dispatcher forwards -->
<!-- -->
<!-- gzip If set to true, then static content will be served-->
<!-- as gzip content encoded if a matching resource is -->
<!-- found ending with ".gz" -->
<!-- gzip If set to true, then static content will be served as -->
<!-- gzip content encoded if a matching resource is -->
<!-- found ending with ".gz" (default false) -->
<!-- (deprecated: use precompressed) -->
<!-- -->
<!-- precompressed If set to a comma separated list of encoding types-->
<!-- (that may be listed in a requests Accept-Encoding -->
<!-- header) to file extension mappings to look for -->
<!-- and serve. For example: "br=.br,gzip=.gz,bzip2=.bz". -->
<!-- If set to a boolean True, then a default set of -->
<!-- compressed formats will be used, otherwise -->
<!-- no precompressed formats. -->
<!-- -->
<!-- resoureBase Can be set to replace the context resource base -->
<!-- -->
<!-- resourceCache If set, this is a context attribute name, -->
<!-- which the servlet will use to look for a shared -->
<!-- ResourceCache instance. -->
<!-- -->
<!-- relativeResourceBase -->
<!-- Set with a pathname relative to the base of the -->
<!-- servlet context root. Useful for only serving -->
<!-- static content from only specific subdirectories. -->
<!-- -->
<!-- pathInfoOnly If true, only the path info will be applied -->
<!-- to the resourceBase -->
<!-- -->
<!-- stylesheet Set with the location of an optional stylesheet -->
<!-- that will be used to decorate the directory -->
<!-- listing html. -->
<!-- -->
<!-- etags If True, weak etags will be generated and handled.-->
<!-- -->
<!-- useFileMappedBuffer -->
<!-- If set to true (the default), a memory mapped -->
<!-- file buffer will be used to serve static content -->
Expand All @@ -104,6 +136,12 @@
<!-- of resource cache. A bio cached buffer may be used-->
<!-- by nio but is not as efficient as a nio buffer. -->
<!-- An nio cached buffer may not be used by bio. -->
<!-- otherGzipFileExtensions -->
<!-- Other file extensions that signify that a file is -->
<!-- already compressed. Eg ".svgz" -->
<!-- -->
<!-- encodingHeaderCacheSize -->
<!-- Max entries in a cache of ACCEPT-ENCODING headers.-->
<!-- -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<servlet>
Expand Down Expand Up @@ -138,7 +176,7 @@
<param-value>both</param-value>
</init-param>
<init-param>
<param-name>gzip</param-name>
<param-name>precompressed</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
Expand Down

0 comments on commit 9a3589d

Please sign in to comment.