Skip to content

Commit

Permalink
Enable GZIP compression for Jetty webserver (openhab#1460)
Browse files Browse the repository at this point in the history
* Enable GZIP compression for Jetty webserver
* Limit to REST resources

Signed-off-by: Jan N. Klug <[email protected]>
  • Loading branch information
J-N-K authored Mar 4, 2023
1 parent 0007259 commit 85b3667
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion distributions/openhab/src/main/resources/runtime/etc/jetty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,18 @@
</Arg>
</Call>
</Get>

<Call name="insertHandler">
<Arg>
<New id="GzipHandler" class="org.eclipse.jetty.server.handler.gzip.GzipHandler">
<Set name="minGzipSize">1024</Set>
<Set name="includedPaths">
<Array type="java.lang.String">
<Item>/rest/*</Item>
</Array>
</Set>
</New>
</Arg>
</Call>

<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<Set name="secureScheme">https</Set>
Expand Down

0 comments on commit 85b3667

Please sign in to comment.