Hard Mode
Hard Mode

Reputation: 45

Apache Traffic Server: Ignoring specific parameter in url query when logging

Currently I use the ats_generic_config.custom_log_format='url=%<cquuc>' to log the request url. The result will be like 'url=http://example.com:4080/abc?aa=AA&bb=BB&cc=CC'. However, the cc parameter contains some sensitive data and I want to strip this field while keep other parameters untouched when logging. I want the logging result to be like 'url=http:ABC.com:4080/abc?aa=AA&bb=BB'. Is there any ATS setting can achieve this result?

Upvotes: 0

Views: 223

Answers (1)

Miles Libbey
Miles Libbey

Reputation: 1643

That wipe filter's function:

ats_generic_config.custom_log_format='url=%<cquuc>'
nocc=filter.wipe('cc') 
log.ascii {
  Format = ats_generic_config.custom_log_format,
  Filename = 'mylogname',
  Filters = { nocc },
}

Upvotes: 0

Related Questions