SRI implementation in AEM site | Community
Skip to main content
May 27, 2025
Solved

SRI implementation in AEM site

  • May 27, 2025
  • 3 replies
  • 475 views

Any one has done Implementation of CSP with Nonce for Inline scripts in AEM as we are using CSP in dispatcher. how we can update Nonce dynamically in CSP and script both?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

AmitVishwakarma
Community Advisor
Community Advisor
May 28, 2025

Hi @arunjh1 ,

Try below step's:

Step 1: Enable Dispatcher to Pass Dynamic CSP Header

In Dispatcher (Apache HTTPD):

/conf/dispatcher/filters/filters.any

# Allow the CSP header to be passed from AEM /Header set Content-Security-Policy "script-src 'self' 'nonce-%{CSP_NONCE}e'"

Add to Apache virtual host:

SetEnvIf Request_URI ".*" CSP_NONCE=<%{CSP_NONCE}e>
kautuk_sahni
Community Manager
Community Manager
June 23, 2025

@arunjh1 Did you find the suggestions helpful? If you need more information, please let us know. If a response resolved your issue, kindly mark it as correct to help others in the future. Alternatively, if you discovered a solution on your own, we'd appreciate it if you could share it with the community. Thank you.

Kautuk Sahni