Error with initializer file content_security_policy
deanfields opened this issue · comments
I am getting this error on a new project build:
app/config/initializers/content_security_policy.rb:20:in `<top (required)>': undefined local variable or method `_r' for main:Object (NameError)
Oops, that was a last minute rubocop failure.
How do things work if you replace what's there with:
Rails.application.config.content_security_policy_nonce_generator = lambda do |_|
SecureRandom.base64(16)
end
I just published 5.2.2 which fixed this issue. Feel free to close this after confirming.
Working now - Thanks