From fa665e1954f5b7f883e056182c7f7958c6665a84 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Thu, 21 Dec 2023 08:32:22 +1100 Subject: [PATCH] Try send a default header --- app/action.rb | 2 +- config.ru | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/action.rb b/app/action.rb index 5af057a..38b967c 100644 --- a/app/action.rb +++ b/app/action.rb @@ -23,7 +23,7 @@ module Adamantium handle_exception StandardError => :handle_error config.default_headers = { - "Content-Type" => "text/html" + "Content-Type" => "application/octet-stream" } def cache(key:, content:) diff --git a/config.ru b/config.ru index 82c96ea..f1ef051 100644 --- a/config.ru +++ b/config.ru @@ -20,9 +20,9 @@ end require "adamantium/middleware/header_fix" use Adamantium::Middleware::HeaderFix do |headers, env| - # if env["REQUEST_METHOD"] == "HEAD" + if env["REQUEST_METHOD"] == "HEAD" headers['Content-Type'] = "text/html" - # end + end end run Hanami.app