Browse Source

feat: 反向代理文本替换增加 sub_filter_types 参数 (#6661)

Refs https://github.com/1Panel-dev/1Panel/issues/6490
pull/6667/head
zhengkunwang 1 month ago committed by GitHub
parent
commit
b091c7f364
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      backend/utils/nginx/components/location.go

2
backend/utils/nginx/components/location.go

@ -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…
Cancel
Save