mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-11 13:53:34 +08:00
支持URL跳转
This commit is contained in:
@@ -148,6 +148,13 @@ func (this *HTTPRequest) Do() {
|
||||
|
||||
// 开始调用
|
||||
func (this *HTTPRequest) doBegin() {
|
||||
// 跳转
|
||||
if len(this.web.HostRedirects) > 0 {
|
||||
if this.doHostRedirect() {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 特殊URL处理
|
||||
if len(this.rawURI) > 1 && this.rawURI[1] == '.' {
|
||||
// ACME
|
||||
@@ -309,6 +316,11 @@ func (this *HTTPRequest) configureWeb(web *serverconfigs.HTTPWebConfig, isTop bo
|
||||
this.web.AccessLogRef = web.AccessLogRef
|
||||
}
|
||||
|
||||
// host redirects
|
||||
if len(web.HostRedirects) > 0 {
|
||||
this.web.HostRedirects = web.HostRedirects
|
||||
}
|
||||
|
||||
// 重写规则
|
||||
if len(web.RewriteRefs) > 0 {
|
||||
for index, ref := range web.RewriteRefs {
|
||||
|
||||
Reference in New Issue
Block a user