How Do I Log Specific Request Headers in My Fuse Undertow Access Log?

Solution Verified - Updated -

Issue

I want to extend the access logging for the default Undertow server in my Fuse Karaf instance to include headers like X-Forwarded-For so I can see the actual request origin. How do I do this?

Environment

Red Hat Fuse 7
Karaf Environment

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content