mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-04 16:00:25 +08:00
服务支持fastcgi;路径规则支持匹配后缀
This commit is contained in:
@@ -191,6 +191,13 @@ func (this *HTTPRequest) doBegin() {
|
||||
}
|
||||
}
|
||||
|
||||
// Fastcgi
|
||||
if this.web.FastcgiRef != nil && this.web.FastcgiRef.IsOn && len(this.web.FastcgiList) > 0 {
|
||||
if this.doFastcgi() {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// root
|
||||
if this.web.Root != nil && this.web.Root.IsOn {
|
||||
// 如果处理成功,则终止请求的处理
|
||||
@@ -210,9 +217,6 @@ func (this *HTTPRequest) doBegin() {
|
||||
return
|
||||
}
|
||||
|
||||
// Fastcgi
|
||||
// TODO
|
||||
|
||||
// 返回404页面
|
||||
this.write404()
|
||||
}
|
||||
@@ -229,7 +233,7 @@ func (this *HTTPRequest) doEnd() {
|
||||
}
|
||||
}
|
||||
|
||||
// 原始的请求URI
|
||||
// RawURI 原始的请求URI
|
||||
func (this *HTTPRequest) RawURI() string {
|
||||
return this.rawURI
|
||||
}
|
||||
@@ -332,6 +336,12 @@ func (this *HTTPRequest) configureWeb(web *serverconfigs.HTTPWebConfig, isTop bo
|
||||
this.web.StatRef = web.StatRef
|
||||
}
|
||||
|
||||
// fastcgi
|
||||
if web.FastcgiRef != nil && (web.FastcgiRef.IsPrior || isTop) {
|
||||
this.web.FastcgiRef = web.FastcgiRef
|
||||
this.web.FastcgiList = web.FastcgiList
|
||||
}
|
||||
|
||||
// 重写规则
|
||||
if len(web.RewriteRefs) > 0 {
|
||||
for index, ref := range web.RewriteRefs {
|
||||
|
||||
Reference in New Issue
Block a user