diff options
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f7f5ef3fbad..c38c6abddc1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -266,6 +266,12 @@ class ApplicationController < ActionController::Base end end + def stream_headers + headers['Content-Length'] = nil + headers['X-Accel-Buffering'] = 'no' # Disable buffering on Nginx + headers['Last-Modified'] = '0' # Prevent buffering via Rack::ETag middleware + end + def default_headers headers['X-Frame-Options'] = 'DENY' headers['X-XSS-Protection'] = '1; mode=block' |