反向代理实现AutoFlush
This commit is contained in:
@@ -20,7 +20,6 @@ type HTTPLocationConfig struct {
|
||||
IsBreak bool `yaml:"isBreak" json:"isBreak"` // 终止向下解析
|
||||
Children []*HTTPLocationConfig `yaml:"children" json:"children"` // 子规则
|
||||
CondGroups []*shared.HTTPRequestCondGroup `yaml:"condGroups" json:"condGroups"` // 匹配条件 TODO
|
||||
AutoFlush bool `yaml:"autoFlush" json:"autoFlush"` // 自动Flush TODO
|
||||
|
||||
patternType HTTPLocationPatternType // 规则类型:LocationPattern*
|
||||
prefix string // 前缀
|
||||
|
||||
@@ -12,7 +12,7 @@ type HTTPWebConfig struct {
|
||||
Charset *HTTPCharsetConfig `yaml:"charset" json:"charset"` // 字符编码
|
||||
Shutdown *HTTPShutdownConfig `yaml:"shutdown" json:"shutdown"` // 临时关闭配置
|
||||
Pages []*HTTPPageConfig `yaml:"pages" json:"pages"` // 特殊页面配置
|
||||
RedirectToHttps *HTTPRedirectToHTTPSConfig `yaml:"redirectToHttps" json:"redirectToHttps"` // 是否自动跳转到Https
|
||||
RedirectToHttps *HTTPRedirectToHTTPSConfig `yaml:"redirectToHTTPS" json:"redirectToHTTPS"` // 是否自动跳转到Https
|
||||
Root *HTTPRootConfig `yaml:"root" json:"root"` // 资源根目录 TODO
|
||||
MaxRequestBodySize string `yaml:"maxRequestBodySize" json:"maxRequestBodySize"` // 请求body最大尺寸 TODO 需要实现
|
||||
AccessLogRef *HTTPAccessLogRef `yaml:"accessLog" json:"accessLog"` // 访问日志配置
|
||||
|
||||
@@ -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"` // 是否自动刷新缓冲区,在比如SSE(server-sent events)场景下很有用
|
||||
|
||||
requestHostHasVariables bool
|
||||
requestURIHasVariables bool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user