You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2025/04/22 05:56:44 UTC
(sling-org-apache-sling-api) branch master updated: SLING-12753 : Add constants for sling.servlet.paths.strict
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-api.git
The following commit(s) were added to refs/heads/master by this push:
new e468c4a SLING-12753 : Add constants for sling.servlet.paths.strict
e468c4a is described below
commit e468c4ac1c26390e8478936d574d5a135360c1b7
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 22 07:56:39 2025 +0200
SLING-12753 : Add constants for sling.servlet.paths.strict
---
.../org/apache/sling/api/servlets/ServletResolverConstants.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java b/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java
index 8e454d2..e4be931 100644
--- a/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java
+++ b/src/main/java/org/apache/sling/api/servlets/ServletResolverConstants.java
@@ -47,6 +47,15 @@ public final class ServletResolverConstants {
*/
public static final String SLING_SERVLET_PATHS = "sling.servlet.paths";
+ /**
+ * When set to {@code true} the strict selection mode for path based servlets is enabled (value is "sling.servlet.paths.strict").
+ * In strict mode, the configured selectors, extensions and methods are taken into account to select servlets.
+ * If this property is not set to {@code true} the behavior is unchanged from previous versions and only the {@link #SLING_SERVLET_PATHS} property is considered when selecting servlets.
+ * The special value {@code .EMPTY.} can be used for the {@link #SLING_SERVLET_SELECTORS} and {@link #SLING_SERVLET_EXTENSIONS} properties to require the corresponding request values to be empty for the servlet to be selected.
+ * @since 2.5.0
+ */
+ public static final String SLING_SERVLET_PATHS_STRICT = "sling.servlet.paths.strict";
+
/**
* The name of the service registration property of a servlet registered as
* a service containing the resource type(s) supported by the servlet (value