Skip to main content

[webtier] Re: Glassfish - Loadbalancing and X-Forwarded-For HTTP Header

1 reply [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jan Luehe

Hi Stephan,

On 02/17/09 08:43 AM, glassfish@javadesktop.org wrote:
> Hallo!
>
> We are using a L7 loadbalancer. The loadbalancer adds the real origin of the request as additional X-Forwarded-For HTTP Header
>
> Is there a way to log X-Forwarded-For in the Access Log?
>

Yes, this is possible. In order to access-log a specific request
header, you can use an access-log token of the form "header.",
where is the name of the request header.

For multi-values request headers, use "headers.".

In your case, you can specify

in your domain.xml (you can update your domain.xml via the CLI,
admin GUI, or manually).

Also make sure you have access-logging turned on.

Thanks,

Jan

> Thanks
> Stephan
> [Message sent by forum member 'iceandfire' (iceandfire)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332298
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net