反向代理实现AutoFlush

This commit is contained in:
GoEdgeLab
2020-09-27 18:41:21 +08:00
parent a737e5cb20
commit 53dc4f7574
5 changed files with 60 additions and 48 deletions

View File

@@ -21,6 +21,8 @@ type ReverseProxyConfig struct {
RequestHost string `yaml:"requestHost" json:"requestHost"` // 请求Host支持变量
RequestURI string `yaml:"requestURI" json:"requestURI"` // 请求URI支持变量如果同时定义了StripPrefix则先执行StripPrefix
AutoFlush bool `yaml:"autoFlush" json:"autoFlush"` // 是否自动刷新缓冲区在比如SSEserver-sent events场景下很有用
requestHostHasVariables bool
requestURIHasVariables bool