Example of using Undertow’s text based handler configuration format

824 Views Asked by At

According to the spec there is a nice text based configuration for Undertow.

However I don't see a single line of example code how to boot Undertow with such configuration.

How to use Undertow.builder()... to build Undertow server with text configuration.

I'm trying to do something like

path-prefix['/api'] -> reverse-proxy[{'http://myserver.com'}]
path-prefix['/*'] -> serve-static-files-here-somehow
1

There are 1 best solutions below

0
On

Have a look at PredicatedHandlersParser and the associated test case.