Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use no-store for web UI to prevent intermediate caching #4966

Merged
merged 1 commit into from Aug 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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-cache"}, [Sidekiq.dump_json(payload)]]
[200, {"Content-Type" => "application/json", "Cache-Control" => "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-cache",
"Cache-Control" => "no-store",
"Content-Language" => action.locale,
"Content-Security-Policy" => CSP_HEADER
}
Expand Down