mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
SECURITY: Don't reuse CSP nonce between anonymous requests
This commit is contained in:

committed by
David Taylor

parent
672f3e7e41
commit
0976c8fad6
@ -3,6 +3,8 @@
|
||||
RSpec.describe Middleware::AnonymousCache do
|
||||
let(:middleware) { Middleware::AnonymousCache.new(lambda { |_| [200, {}, []] }) }
|
||||
|
||||
before { Middleware::AnonymousCache.enable_anon_cache }
|
||||
|
||||
def env(opts = {})
|
||||
create_request_env(path: opts.delete(:path) || "http://test.com/path?bla=1").merge(opts)
|
||||
end
|
||||
|
Reference in New Issue
Block a user