Skip to content

Commit

Permalink
Add private to Sidekiq Web UI Cache-Control to prevent request collap…
Browse files Browse the repository at this point in the history
…sing (sidekiq#4967)
  • Loading branch information
shaunbennett authored and jonhyman committed Sep 16, 2021
1 parent b5c85f3 commit 31d9330
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq/web/action.rb
Expand Up @@ -68,7 +68,7 @@ def render(engine, content, options = {})
end

def json(payload)
[200, {"Content-Type" => "application/json", "Cache-Control" => "no-store"}, [Sidekiq.dump_json(payload)]]
[200, {"Content-Type" => "application/json", "Cache-Control" => "private, no-store"}, [Sidekiq.dump_json(payload)]]
end

def initialize(env, block)
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/web/application.rb
Expand Up @@ -314,7 +314,7 @@ def call(env)
# rendered content goes here
headers = {
"Content-Type" => "text/html",
"Cache-Control" => "no-store",
"Cache-Control" => "private, no-store",
"Content-Language" => action.locale,
"Content-Security-Policy" => CSP_HEADER
}
Expand Down

0 comments on commit 31d9330

Please sign in to comment.