From 12c6e7b300d312fbaa6fd2d2d546419ff67bf910 Mon Sep 17 00:00:00 2001 From: Andrey Glushkov Date: Mon, 25 Feb 2019 21:25:13 +0300 Subject: Allow custom cache-control header in AC::Live https://github.com/rails/rails/issues/35312 --- actionpack/lib/action_controller/metal/live.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index 083b762f5a..eb43ff9c63 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -146,7 +146,7 @@ module ActionController def write(string) unless @response.committed? - @response.set_header "Cache-Control", "no-cache" + @response.headers["Cache-Control"] ||= "no-cache" @response.delete_header "Content-Length" end -- cgit v1.2.3