1 Reply Latest reply on Oct 18, 2019 5:27 AM by zhurlik

    How to add custom filter of undertow by using jboss.cli

    leidijian

      Server : WindFly 10, Undertow 8

      I've created a custom filter "MyFilter" by following the article http://www.mastertheboss.com/jboss-web/jbosswebserver/configuring-undertow-filters-on-wildfly. But i didn't find the way to use jboss.cli to add it in the configuration.

      I've tried /subsystem=undertow/configuration=filter/filter=myFilter/:add(module=com.xxx.myfilter,class-name=com.xxx.MyFilter), and got the following error:

      ERROR [org.jboss.as.cli.CommandContext] Failed to get the list of the operationproperties: "WFLYCTL0030: No resource definition is registered for address [ ("subsystem" => "undertow"), ("configuration" => "filter"), ("filter" => "myFilter")

      So whether we can only add filter by manually editing the configuration file?