instance method _set_vary_header

Ruby on Rails 8.0.5.2

Since v6.1.7.10 Private — implementation detail, not part of the public API

Available in: v6.1.7.10 v7.0.10 v7.1.6 v7.2.4 v8.0.5.2 v8.1.4.1 edge

Signature

_set_vary_header()

No documentation comment.

Source
# File actionpack/lib/action_controller/metal/rendering.rb, line 220
      def _set_vary_header
        if request.should_apply_vary_header?
          vary_headers = response.headers["Vary"].to_s.split(",").map(&:strip).reject(&:blank?)

          unless vary_headers.include?("*")
            request.vary_headers.each do |header|
              vary_headers << header unless vary_headers.any? { |existing| existing.casecmp?(header) }
            end
            response.headers["Vary"] = vary_headers.join(", ")
          end
        end
      end

Defined in actionpack/lib/action_controller/metal/rendering.rb line 220 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Rendering

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close