feat: 反向代理文本替换增加 sub_filter_types 参数 (#6661)
Some checks are pending
Build Test / build-linux-binary (push) Waiting to run
Build / SonarCloud (push) Waiting to run
sync2gitee / repo-sync (push) Waiting to run

Refs https://github.com/1Panel-dev/1Panel/issues/6490
This commit is contained in:
zhengkunwang 2024-10-09 15:02:56 +08:00 committed by GitHub
parent e069db3c45
commit b091c7f364
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -234,11 +234,13 @@ func (l *Location) AddSubFilter(subFilters map[string]string) {
}
l.UpdateDirective("proxy_set_header", []string{"Accept-Encoding", `""`})
l.UpdateDirective("sub_filter_once", []string{"off"})
l.UpdateDirective("sub_filter_types", []string{"*"})
}
func (l *Location) RemoveSubFilter() {
l.RemoveDirective("sub_filter", []string{})
l.RemoveDirective("proxy_set_header", []string{"Accept-Encoding", `""`})
l.RemoveDirective("sub_filter_once", []string{"off"})
l.RemoveDirective("sub_filter_types", []string{"*"})
l.Replaces = nil
}