Da_Vicki
Da_Vicki

Reputation: 91

Apache get particular cookie value from response in httpd.conf

I want to log a cookie value from response in Apache. How can I do that. The closest option is

Logformat "%{Set-Cookie}o"

this logs all cookies in response.

How can I extract a particular cookie value & log it?

Upvotes: 0

Views: 3740

Answers (2)

Yuga
Yuga

Reputation: 19

Logformat "%{Foobar}C"

This works with request only. If there is a new cookie being set in the response, this will NOT pick that up.

Upvotes: 0

Paul Sweatte
Paul Sweatte

Reputation: 24617

Use the C format string to log a cookie, such as this:

Logformat "%{Foobar}C"

to log the contents of cookie Foobar.

References

Upvotes: 0

Related Questions