IPMaskFilter is a Caddy log field filter that masks IP addresses in a string, or in an array of strings. The string may be a comma separated list of IP addresses, where all of the values will be masked.
| 149 | // list of IP addresses, where all of the values |
| 150 | // will be masked. |
| 151 | type IPMaskFilter struct { |
| 152 | // The IPv4 mask, as a subnet size CIDR. |
| 153 | IPv4MaskRaw int `json:"ipv4_cidr,omitempty"` |
| 154 | |
| 155 | // The IPv6 mask, as a subnet size CIDR. |
| 156 | IPv6MaskRaw int `json:"ipv6_cidr,omitempty"` |
| 157 | |
| 158 | v4Mask net.IPMask |
| 159 | v6Mask net.IPMask |
| 160 | } |
| 161 | |
| 162 | // CaddyModule returns the Caddy module information. |
| 163 | func (IPMaskFilter) CaddyModule() caddy.ModuleInfo { |
nothing calls this directly
no outgoing calls
no test coverage detected