mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
SECURITY: Disallow caching of MIME/Content-Type errors (#14907)
This will sign intermediary proxies and/or misconfigured CDNs to not cache those error responses.
This commit is contained in:

committed by
GitHub

parent
9ca93f57cc
commit
6645243a26
@ -315,7 +315,7 @@ module Middleware
|
||||
if PAYLOAD_INVALID_REQUEST_METHODS.include?(env[Rack::REQUEST_METHOD]) &&
|
||||
env[Rack::RACK_INPUT].size > 0
|
||||
|
||||
return [413, {}, []]
|
||||
return [413, { "Cache-Control" => "private, max-age=0, must-revalidate" }, []]
|
||||
end
|
||||
|
||||
helper = Helper.new(env)
|
||||
|
Reference in New Issue
Block a user