This is an automated email from the ASF dual-hosted git repository.

joerghoh pushed a commit to branch SLING-13358
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-engine.git

commit 4fc909c82657a993439b5dcebb67dcb2faee3714
Author: Joerg Hoh <[email protected]>
AuthorDate: Mon Sep 21 18:58:04 2026 +0200

    SLING-13358 include protections should be re-configurable"
---
 .../org/apache/sling/engine/impl/helper/SlingServletContext.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java 
b/src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java
index 26394bb..0cae26f 100644
--- a/src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java
+++ b/src/main/java/org/apache/sling/engine/impl/helper/SlingServletContext.java
@@ -124,16 +124,14 @@ public class SlingServletContext implements 
ServletContext, ServletContextListen
 
     private volatile ServiceRegistration<ServletContext> registration;
 
-    private final boolean protectHeadersOnInclude;
-    private final boolean checkContentTypeOnInclude;
+    private volatile boolean protectHeadersOnInclude;
+    private volatile boolean checkContentTypeOnInclude;
 
     @Activate
     public SlingServletContext(
             final Config config, final BundleContext bundleContext, @Reference 
final ProductInfoProvider infoProvider) {
         this.bundleContext = bundleContext;
         this.productInfoProvider = infoProvider;
-        this.protectHeadersOnInclude = config.sling_includes_protectheaders();
-        this.checkContentTypeOnInclude = 
config.sling_includes_checkcontenttype();
         this.setup(config);
     }
 
@@ -148,6 +146,8 @@ public class SlingServletContext implements ServletContext, 
ServletContextListen
         } else {
             this.configuredServerInfo = null;
         }
+        this.protectHeadersOnInclude = config.sling_includes_protectheaders();
+        this.checkContentTypeOnInclude = 
config.sling_includes_checkcontenttype();
 
         this.setServerInfo();
     }

Reply via email to