From ae9e64332178ceff5ba29ace140769c91962881c Mon Sep 17 00:00:00 2001 From: Echo Date: Thu, 5 Jun 2025 01:47:45 -0400 Subject: [PATCH] compress html on build --- Gemfile | 2 ++ config/application.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 739a042..be80a04 100644 --- a/Gemfile +++ b/Gemfile @@ -122,3 +122,5 @@ group :test do gem "capybara" gem "selenium-webdriver" end + +gem "htmlcompressor", "~> 0.4.0" diff --git a/config/application.rb b/config/application.rb index 48548fa..395ea29 100644 --- a/config/application.rb +++ b/config/application.rb @@ -46,5 +46,7 @@ module Harbor expire_after: 14.days, secure: Rails.env.production?, httponly: true + + config.middleware.use HtmlCompressor::Rack end end