mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-13 02:55:18 +08:00
feat: 反向代理文本替换增加 sub_filter_types 参数 (#6661)
Refs https://github.com/1Panel-dev/1Panel/issues/6490
This commit is contained in:
parent
e069db3c45
commit
b091c7f364
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue