0

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

Dynamic
  • 1
  • 2

1 Answers1

0

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.

Emmanuel Collin
  • 2,556
  • 2
  • 10
  • 17