CaddyfileHeaderOp applies a new header operation according to field, value, and replacement. The field can be prefixed with "+" or "-" to specify adding or removing; otherwise, the value will be set (overriding any previous value). If replacement is non-nil, value will be treated as a regular expres
(ops *HeaderOps, field, value string, replacement *string)
| 219 | // complete the substring replacement; in that case, any + or - |
| 220 | // prefix to field will be ignored. |
| 221 | func CaddyfileHeaderOp(ops *HeaderOps, field, value string, replacement *string) error { |
| 222 | return applyHeaderOp(ops, nil, field, value, replacement) |
| 223 | } |
| 224 | |
| 225 | func applyHeaderOp(ops *HeaderOps, respHeaderOps *RespHeaderOps, field, value string, replacement *string) error { |
| 226 | switch { |
no test coverage detected