mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-06 10:00:25 +08:00
支持路由定义请求脚本
This commit is contained in:
@@ -474,7 +474,10 @@ func (this *HTTPRequest) configureWeb(web *serverconfigs.HTTPWebConfig, isTop bo
|
||||
// request scripts
|
||||
if web.RequestScripts != nil {
|
||||
if this.web.RequestScripts == nil {
|
||||
this.web.RequestScripts = web.RequestScripts
|
||||
this.web.RequestScripts = &serverconfigs.HTTPRequestScriptsConfig{
|
||||
InitGroup: web.RequestScripts.InitGroup,
|
||||
RequestGroup: web.RequestScripts.RequestGroup,
|
||||
} // 不要直接赋值,需要复制,防止在运行时被修改
|
||||
} else {
|
||||
if web.RequestScripts.InitGroup != nil && (web.RequestScripts.InitGroup.IsPrior || isTop) {
|
||||
if this.web.RequestScripts == nil {
|
||||
|
||||
Reference in New Issue
Block a user