Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #820 from hawkular/HAWKULAR-784
Browse files Browse the repository at this point in the history
HAWKULAR-784 - Enable compression for serving the Hawkular UI from Undertow
  • Loading branch information
mtho11 committed Feb 2, 2016
2 parents f04c15f + b1afa9d commit ec2eb52
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dist/src/main/resources/standalone.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,21 @@
<xsl:call-template name="loggers"/>
</xsl:template>

<!-- Enable gzip compression when serving javascript and ccs -->
<xsl:template match="undertow:subsystem/undertow:server/undertow:host">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
<filter-ref name="gzipFilter" predicate="regex[pattern=&apos;(?:application/javascript|text/css|text/html|application/json)(;.*)?&apos;, value=%{{o,Content-Type}}, full-match=true]"/>
</xsl:copy>
</xsl:template>

<xsl:template match="undertow:subsystem/undertow:filters">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
<gzip name="gzipFilter" />
</xsl:copy>
</xsl:template>

<!-- Enable Statistics for Undertow, TXs and Datasources -->
<xsl:template match="undertow:subsystem">
<xsl:copy>
Expand Down

0 comments on commit ec2eb52

Please sign in to comment.