(subFilters map[string]string)
| 331 | } |
| 332 | |
| 333 | func (l *Location) AddSubFilter(subFilters map[string]string) { |
| 334 | l.RemoveDirective("sub_filter", []string{}) |
| 335 | l.Replaces = subFilters |
| 336 | for k, v := range subFilters { |
| 337 | l.UpdateDirective("sub_filter", []string{fmt.Sprintf(`"%s"`, k), fmt.Sprintf(`"%s"`, v)}) |
| 338 | } |
| 339 | l.UpdateDirective("proxy_set_header", []string{"Accept-Encoding", `""`}) |
| 340 | l.UpdateDirective("sub_filter_once", []string{"off"}) |
| 341 | l.UpdateDirective("sub_filter_types", []string{"*"}) |
| 342 | } |
| 343 | |
| 344 | func (l *Location) RemoveSubFilter() { |
| 345 | l.RemoveDirective("sub_filter", []string{}) |
no test coverage detected