Configure Apache, IHS, and Nginx for seamless nonce injection and caching.
Integrate EdgeNonce seamlessly into Apache, IHS, or Nginx, whether as a caching layer or a standalone on-premises nonce injector sitting behind your Cloudflare Worker service at https://edge-nonce.com.
Because the AEM plugin outputs a static placeholder CF_EDGE_NONCE, your HTML pages remain 100% cacheable in the Dispatcher or mod_cache layers. To prevent conflicts, configure Apache to strip backend CSP headers:
For standalone, on-premises setups, use Apache's output filter chain to substitute the placeholder with the request's unique ID environment variable:
When using Nginx as a caching reverse proxy (e.g., proxy_cache), ensure that backend CSP headers generated by AEM or upstream origins are stripped out to prevent cache-poisoning conflicts with the edge-injected headers.
To inject nonces natively on Nginx without an edge worker, use the sub_filter module to dynamically replace the placeholder with Nginx's built-in unique request ID.
If you want your on-premises web server to explicitly route traffic through the EdgeNonce Cloudflare service, configure your server to proxy_pass traffic to https://edge-nonce.com. This allows internal corporate networks to leverage the Cloudflare edge injection.
Drupal emits the static placeholder CF_EDGE_NONCE, enabling 100% cache hit ratios across Drupal Internal Page Cache and upstream Varnish. Strip backend CSP headers in Varnish:
Need the complete configuration files, filter ordering specifications for IHS 8 (Apache 2.2), or Drupal 9/10/11 module setups? View our complete offline Apache & IBM HTTP Server (IHS) Guide or our dedicated Drupal Integration Guide.