X-FORWARDED-FOR header in weblogic

414 Views Asked by At

So I have modified the config.xml file line from

c-ip date time time-taken cs-method cs-uri sc-status bytes

to

cs(X-Forwarded-For) c-ip date time time-taken cs-method cs-uri sc-status bytes

to log the X-Forwaded-For in the access.log

However, I want to introduce an if condition that in case if the X-Forwarded-For doesn't have any information populated we populate the ip that is accessing the webserver.

If the above is not possible, After putting the above line the X-Forwarded-For Ip becomes between quotes for example like that "192.168.1.1" is it possible to have that without the quotes?

I have modified the config.xml file line from

c-ip date time time-taken cs-method cs-uri sc-status bytes

to

cs(X-Forwarded-For) c-ip date time time-taken cs-method cs-uri sc-status bytes

1

There are 1 best solutions below

0
Emmanuel Collin On

Everything is explained in this documentation. You can create your own custom fields and make them display whatever you need. Creating custom fields is explained in this chapter.