diff --git a/frameworks/Ruby/rails/app/controllers/application_controller.rb b/frameworks/Ruby/rails/app/controllers/application_controller.rb index 02f927caed7..0ef204a6b6b 100644 --- a/frameworks/Ruby/rails/app/controllers/application_controller.rb +++ b/frameworks/Ruby/rails/app/controllers/application_controller.rb @@ -1,11 +1,13 @@ # frozen_string_literal: true class ApplicationController < ActionController::Base - before_action :add_header + if defined?(Agoo) || defined?(Falcon) || defined?(Puma) + before_action :add_date_header + end private - def add_header + def add_date_header response.set_header('Date', Time.now.httpdate) end end