lib/sidekiq/web/application.rb in sidekiq-6.0.4 vs lib/sidekiq/web/application.rb in sidekiq-6.0.5
- old
+ new
@@ -298,24 +298,22 @@
self.class.run_afters(app, action)
end
resp = case resp
when Array
+ # redirects go here
resp
else
+ # rendered content goes here
headers = {
"Content-Type" => "text/html",
"Cache-Control" => "no-cache",
"Content-Language" => action.locale,
"Content-Security-Policy" => CSP_HEADER,
}
-
+ # we'll let Rack calculate Content-Length for us.
[200, headers, [resp]]
end
-
- resp[1] = resp[1].dup
-
- resp[1][CONTENT_LENGTH] = resp[2].sum(&:bytesize).to_s
resp
end
def self.helpers(mod = nil, &block)