aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/app/assets/javascripts/rails-ujs/utils/csp.coffee
blob: 8d2d6ce4470bc654f7426451f57a61861485ac4e (plain) (blame)
1
2
3
4
# Content-Security-Policy nonce for inline scripts
cspNonce = Rails.cspNonce = ->
  meta = document.querySelector('meta[name=csp-nonce]')
  meta and meta.content