-
Bug
-
Resolution: Done
-
Major
-
21.0.0.Final
-
None
-
Workaround Exists
-
-
Undefined
-
---
-
---
Undertow subsystem supports the property expression for the "predicate" attribute of <filter-ref> as shown below in the resource description. However, it does not resolve and expand the specified property expression.
[standalone@node1:9990 /] /subsystem=undertow/server=default-server/host=default-host/filter-ref=*:read-resource-description(recursive=true) { ... "result" => { "description" => "Reference to filter", "attributes" => { "predicate" => { "type" => STRING, "description" => "Predicates provide a simple way of making a true/false decision based on an exchange. Many handlers have a requirement that they be applied conditionally, and predicates provide a general way to specify a condition.", "expressions-allowed" => true, "required" => false, "nillable" => true, "access-type" => "read-write", "storage" => "configuration", "restart-required" => "all-services" }, "priority" => { "type" => INT, "description" => "Defines filter order. A lower number instructs the server to be included earlier in the handler chain than others with h igher numbers. Values range from 1, indicating the filter will be handled first, to 2147483647, resulting in the filter being handled last.", "expressions-allowed" => true, "required" => false, "nillable" => true, "default" => 1, "min" => 1L, "max" => 2147483647L, "access-type" => "read-write", "storage" => "configuration", "restart-required" => "all-services" } }, "operations" => undefined, "notifications" => undefined, "children" => {} } }] }
Example configuration:
<subsystem xmlns="urn:jboss:domain:undertow:10.0" ...> ... <server name="default-server"> ... <host name="default-host" alias="localhost"> ... <filter-ref name="request-limit-filter" predicate="not path-prefix('/${env.FOOBAR}')"/> <filter-ref name="dump-request-filter" predicate="path-prefix('/${my.predicate.path.test}')"/> </host> </server> ... <filters> <request-limit name="request-limit-filter" max-concurrent-requests="10" queue-size="1"/> <expression-filter name="dump-request-filter" expression="dump-request"/> </filters> </subsystem>
Then, start WildFly with specifying the system property and environment variable:
FOOBAR=example ./bin/standalone.sh -Dmy.predicate.path.test=test
- clones
-
JBEAP-20356 [GSS](7.3.z) WFLY-13976 - Undertow subsystem <filter-ref> does not resolve property expression for the predicate attribute
- Closed