aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/lib/action_controller/metal/default_headers.rb
blob: eef0602fcdde17c9810d2f162a55f2d8fc052d82 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                             
# frozen_string_literal: true

module ActionController
  # Allows configuring default headers that will be automatically merged into
  # each response.
  module DefaultHeaders
    extend ActiveSupport::Concern

    module ClassMethods
      def make_response!(request)
        ActionDispatch::Response.create.tap do |res|
          res.request = request
        end
      end
    end
  end
end