Sha256: e920839e6a54f1893e0b3d0959e7c491dda450b85b804eeb09d935638fd65d70
Contents?: true
Size: 685 Bytes
Versions: 42
Compression:
Stored size: 685 Bytes
Contents
# frozen_string_literal: true module ActionView module Helpers # :nodoc: # = Action View CSP \Helpers module CspHelper # Returns a meta tag "csp-nonce" with the per-session nonce value # for allowing inline <script> tags. # # <head> # <%= csp_meta_tag %> # </head> # # This is used by the \Rails UJS helper to create dynamically # loaded inline <script> elements. # def csp_meta_tag(**options) if content_security_policy? options[:name] = "csp-nonce" options[:content] = content_security_policy_nonce tag("meta", options) end end end end end
Version data entries
42 entries across 42 versions & 6 rubygems