反向代理设置中增加移除回源主机名端口功能

This commit is contained in:
GoEdgeLab
2022-06-30 12:11:30 +08:00
parent 140b322e9a
commit ed0d08b4f9
4 changed files with 3170 additions and 3156 deletions

View File

@@ -32,10 +32,11 @@ type ReverseProxyConfig struct {
MaxConns int `yaml:"maxConns" json:"maxConns"` // 最大并发连接数 TODO
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"` // 最大空闲连接数 TODO
StripPrefix string `yaml:"stripPrefix" json:"stripPrefix"` // 去除URL前缀
RequestHostType RequestHostType `yaml:"requestHostType" json:"requestHostType"` // 请求Host类型
RequestHost string `yaml:"requestHost" json:"requestHost"` // 请求Host支持变量
RequestURI string `yaml:"requestURI" json:"requestURI"` // 请求URI支持变量如果同时定义了StripPrefix则先执行StripPrefix
StripPrefix string `yaml:"stripPrefix" json:"stripPrefix"` // 去除URL前缀
RequestHostType RequestHostType `yaml:"requestHostType" json:"requestHostType"` // 请求Host类型
RequestHost string `yaml:"requestHost" json:"requestHost"` // 请求Host支持变量
RequestURI string `yaml:"requestURI" json:"requestURI"` // 请求URI支持变量如果同时定义了StripPrefix则先执行StripPrefix
RequestHostExcludingPort bool `yaml:"requestHostExcludingPort" json:"requestHostExcludingPort"` // 请求Host不包括端口
AddHeaders []string `yaml:"addHeaders" json:"addHeaders"` // 自动添加的Header