Sha256: e01d2e855fa2bc40cc86f9dba601a4474e86ee104faf8957c7fd91cf0fd1ce8a
Contents?: true
Size: 760 Bytes
Versions: 8
Compression:
Stored size: 760 Bytes
Contents
class Recipes::Rails < Rails::AppBuilder def create gather_gem("bootsnap", require: false) gather_gems(:development) do gather_gem("spring") end environment 'config.force_ssl = true', env: 'production' disable_automatic_nonce_generation end def disable_automatic_nonce_generation line = "Rails.application.config.content_security_policy_nonce_generator = \ -> request { SecureRandom.base64(16) }" initializer = "config/initializers/content_security_policy.rb" gsub_file initializer, /(#{Regexp.escape(line)})/mi do |_match| <<~HERE.chomp # Rails.application.config.content_security_policy_nonce_generator = -> request do # SecureRandom.base64(16) # end HERE end end end
Version data entries
8 entries across 8 versions & 1 rubygems