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 (#4967)
  • Loading branch information
shaunbennett committed Aug 14, 2021
1 parent 20f4bab commit 13e2b56
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 13e2b56

Please sign in to comment.