maven - Allow G zip compression in wildfly-8.2.0.Final -
i running java project on wildfly-8.2.0.final, , want enable g-zip compression web content (js, css ,jsp etc), how achieve it.
i got done, need change standalone.xml search , make changes below
<subsystem xmlns="urn:jboss:domain:undertow:1.2"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> **<filter-ref name="gzipfilter" predicate="regex[pattern='(?:application/javascript|text/css|text/html)(;.*)?', value=%{o,content-type}, full-match=true]"/>** <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> </server> <servlet-container name="default"> <jsp-config/> <websockets/> </servlet-container> <handlers> <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/> </handlers> <filters> <response-header name="server-header" header-name="server" header-value="wildfly/8"/> <response-header name="x-powered-by-header" header-name="x-powered-by" header-value="undertow/1"/> **<gzip name="gzipfilter"/>** </filters> </subsystem>
(text in bold changes)
Comments
Post a Comment