diff options
Diffstat (limited to 'actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee')
-rw-r--r-- | actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee b/actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee new file mode 100644 index 0000000000..8d2d6ce447 --- /dev/null +++ b/actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee @@ -0,0 +1,4 @@ +# Content-Security-Policy nonce for inline scripts +cspNonce = Rails.cspNonce = -> + meta = document.querySelector('meta[name=csp-nonce]') + meta and meta.content |