Undertow WildFly Subsystem Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 110: Line 110:
   <filters>
   <filters>
     ...
     ...
     <filter name="request-dumper" class-name="io.undertow.server.handlers.RequestDumpingHandler" module="io.undertow.core" />
     <filter name="request-dumper" class-name="io.undertow.server.handlers.RequestDumpingHandler" module="io.undertow.core"/>
   </filters>
   </filters>
   ...
   ...
</pre>
</pre>

Revision as of 06:48, 21 January 2016

External

Internal

Overview

        ...
        <subsystem xmlns="urn:jboss:domain:undertow:3.0">

            <buffer-cache name="default"/>

            <server name="default-server">

                <http-listener name="default" 
                                      worker="default"
                                      redirect-socket="https" 
                                      socket-binding="http"/>

                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
                </host>
            </server>
            <servlet-container name="default">
                <jsp-config/>
                <websockets/>
            </servlet-container>
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
            </handlers>
            <filters>
                <response-header name="server-header" header-value="JBoss-EAP/7" header-name="Server"/>
                <response-header name="x-powered-by-header" header-value="Undertow/1" header-name="X-Powered-By"/>
            </filters>
        </subsystem>
        ...

Schema


https://github.com/wildfly/wildfly/tree/master/undertow/src/main/resources/schema

Configuration Elements

buffer-cache

server

http-listener

Note that the this http listener is also used by JBoss Remoting HTTP connector, so if the name of the listener changes, the http-connector's connector-ref should be changed accordingly.

name

worker

The HTTP listener uses the XNIO Worker declared and configured by the io subsystem. The XNIO worker's configuration is described here: io subsystem worker configuration. The default value is "default".

redirect-socket

socket-binding

host

location

filter-ref

Specifies the name of a filter declared below in the <filters/> section.

If more than one filter is specified here, the filters are executed in the order of their declared priority.

access-log

Configures Undertow to generate access logs according to a certain pattern. The functionality is similar to Tomcat's AccessLogValve. For more details see Tomcat Configuration.

access-log Configuration Details

servlet-container

handlers

filters

Configuring Filters

Configuring a Custom Undertow Filter in WildFly

Configuring a Custom Undertow Filter in WildFly

Adding a RequestDumper

TODO: not tested yet.

   ...
   <host name="default-host" >
      ...
      <filter-ref name="request-dumper"/>
   </host>
   ...
   <filters>
     ...
     <filter name="request-dumper" class-name="io.undertow.server.handlers.RequestDumpingHandler" module="io.undertow.core"/>
   </filters>
   ...