From 1c80f48a3ee1c1cfc39ad4896130ec97de3c7e81 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 17 Jun 2020 18:12:59 -0500 Subject: [PATCH] Extend Webpacker::DevServerProxy read_timeout --- config/application.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config/application.rb b/config/application.rb index 09000123..adf3c0f4 100755 --- a/config/application.rb +++ b/config/application.rb @@ -112,5 +112,18 @@ module Commitchange config.active_storage.variant_processor = :vips config.action_mailer.default_options = {from: "Default Org Team "} + + # this works around a bug where the the webpacker proxy + # only waits 60 seconds for a compilation to happen. That's not + # fast enough on startup and Webpacker doesn't allow us to override. + # + # TODO: figure out how to delete the first instance of DevServerProxy + initializer "houdini.webpacker.proxy" do |app| + insert_middleware = Webpacker.config.dev_server.present? rescue nil + if insert_middleware + app.middleware.insert_before 0, + Webpacker::DevServerProxy, ssl_verify_none: true, read_timeout: 500 + end + end end end