back to all blogsSee all blog posts

Specify hostnames, wildcards, or IP segments for hosts that are allowed to send private HTTP headers in Open Liberty

image of author
Jakub Pomykala on Feb 19, 2021
Post available in languages:

With Open Liberty you can now configure trustedHeaderOrigin and trustedSensitiveHeaderOrigin using IP address wildcards and hostnames.

In Open Liberty

View the list of fixed bugs in

HTTP Channel Configuration Improvements

"WebSphere private headers" in the form $WSXX are used by WebSphere-aware proxies to provide information about original requests. The values provided by these headers are made available to the application via ServletRequest APIs such as getRemoteHost(). Two HTTP Dispatcher custom properties are provided by Open Liberty to control which remote hosts are allowed to send the trustedHeaderOrigin and trustedSensitiveHeaderOrigin private headers. Ideally, these dispatcher properties are configured to trust only known proxy servers that forward requests to the Open Liberty server.

Previously, the trustedHeaderOrigin and trustedSensitiveHeaderOrigin properties accepted only " * " , "none", or a list of full IP addresses (eg. ", "). As requested by customers, both properties can now additionally be configured with IP address wildcards and hostnames. As an example, the following list which will be valid for either property: "localhost,, 192.168. * . * , 0:0:0:0:0:ffff*:*, * "

The same list as a server.xml example:

<httpDispatcher trustedHeaderOrigin="*" trustedSensitiveHeaderOrigin="localhost,, 192.168.*.*, 0:0:0:0:0:ffff:*:*, *"/>

For more information about these properties, see Open Liberty docs on httpDispatcher

Significant bugs fixed in this release

We’ve spent some time fixing bugs. The following sections describe just some of the issues resolved in this release. If you’re interested, here’s the full list of bugs fixed in

  • Update gRPC dependencies to 1.35

    Currently Open Liberty uses grpc-java version 1.31.1 to provide its grpc-1.0 and grpcClient-1.0 features. This issue will update the grpc-java dependencies we build on to their latest version which is 1.35.0. The 1.35.0 release we’re pulling in provides numerous improvements and bug fixes; for a full list see GRPC Java Release Notes

  • Expression Language 3.0 value lookup performance improvement

    Lookup performance has been improved for certain Expression Language 3.0 values. By optimizing EL 3.0 context handling and classloader calls, the evaluations of EL unscoped and static expressions perform better with this fix. This fix includes Apache bug fix 62453 and also Apache bug 63781 to support multiple java levels correctly.

  • System Web Application Bundles may not be fully provisioned until after the server reports as started

    When a Web Application Bundle (WAB) is included in a Liberty feature (also called a system WAB) it is possible that the server started message and the TCP ports will be opened and listening before the WAB has been fully provisioned with the web container. This is different behaviour to web applications WARs where the server started and TCP ports are delayed until all the applications have started or a timeout has occurred on server start.

    This could lead to 404 errors early after the server started status has returned until the WABs come online with the web container. The server should delay the TCP ports listening and the server started event for system WABs similar to the way it waits for applications to start.

    This has been fixed by delaying the server started message and TCP port listening until the system WABs are ready to serve, or a timeout has occurred. This has been done by introducing a new service type ServerReadyStatus, the feature manager will call this service before registering ServerStarted. Implementations of ServerReadyStatus have the check method called to allow them to block while waiting for the server to be ready before proceeding to register ServerStarted.

    This allows the WABInstaller to check on the status of the system WABs to make sure the have completed their provisioning to the web container.

  • FeatureUtility not parsing liberty custom environment variables

    When the entry is /${shared.config.dir}/server.xml” and the environment variable is WLP_USER_DIR=/test/ in the test/config/server.xml file the user recieves an error stating that "it couldn’t find file at /user/test/wlp/usr/shared/config/server.xml" where it should have been looking for test/config/server.xml.

    This bug caused include tags to not be parsed correctly by not replacing the environment variables found here

  • NullPointerException in HttpServletRequest or HttpServletResponse context proxies

    Using the HttpServletRequest or HttpServletResponse JAX-RS context proxies with a null runtime context previously may have resulted in a NullPointerException similar to the following:

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(

    This issue was resolved by adding a null checks to these two proxy classes similar to those in other proxy classes.

  • ClassCastException when serving a static resource

    When the following conditions occur:

  • The servlet-4.0 feature is installed

  • The request is for a static resource

  • The application wraps the request object in its filter.

    A java.lang.ClassCastException might occur near the end of the request cycle when the server is trying to cache information for a served static resource. (e.g. xml, html, jpg, css…​). The response is still sent back to a client normally without any issue.

    An example of the exception:

    java.lang.ClassCastException: com.example.MyWrappedRequest incompatible with

    This bug has been removed by fixing a ClassCastException when caching a static servlet wrapper under servlet-4.0 feature.

Run your apps using

If you’re using Maven, here are the coordinates:


Or for Gradle:

dependencies {
    libertyRuntime group: 'io.openliberty', name: 'openliberty-runtime', version: '[,)'

Or if you’re using Docker:

FROM open-liberty

Or take a look at our Downloads page.

Ask a question on Stack Overflow

Get Open Liberty now