From 4ec9d0344a4dc72efe73a71abe459b35a541e83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Fri, 17 Jan 2025 09:51:48 +0100 Subject: [PATCH] Add compression via content-encoding --- bin/builder_web_app.ml | 1 + bin/dune | 6 +++--- builder-web.opam | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/builder_web_app.ml b/bin/builder_web_app.ml index 34173f8..eabc600 100644 --- a/bin/builder_web_app.ml +++ b/bin/builder_web_app.ml @@ -165,6 +165,7 @@ let setup_app level influx port host datadir cachedir configdir run_batch_viz_fl in Dream.run ~port ~interface:host ~tls:false ~error_handler @@ Dream.logger + @@ Dream_encoding.compress @@ Dream.sql_pool ("sqlite3:" ^ dbpath) @@ Http_status_metrics.handle @@ Builder_web.Middleware.remove_trailing_url_slash diff --git a/bin/dune b/bin/dune index 040058c..6db9dbb 100644 --- a/bin/dune +++ b/bin/dune @@ -7,9 +7,9 @@ (public_name builder-web) (name builder_web_app) (modules builder_web_app) - (libraries builder_web builder_system mirage-crypto-rng.unix cmdliner - logs.cli metrics metrics-lwt metrics-influx metrics-rusage ipaddr - ipaddr.unix http_status_metrics)) + (libraries builder_web builder_system dream dream-encoding + mirage-crypto-rng.unix cmdliner logs.cli metrics metrics-lwt metrics-influx + metrics-rusage ipaddr ipaddr.unix http_status_metrics)) (executable (public_name builder-db) diff --git a/builder-web.opam b/builder-web.opam index a89c5fb..a9dfc6f 100644 --- a/builder-web.opam +++ b/builder-web.opam @@ -19,6 +19,7 @@ depends: [ "dune" {>= "2.7.0"} "builder" {>= "0.4.0"} "dream" {>= "1.0.0~alpha7"} + "dream-encoding" "bos" "ohex" {>= "0.2.0"} "lwt" {>= "5.7.0"}