自定义页面增加例外URL和限制URL设置

This commit is contained in:
刘祥超
2023-11-13 10:46:26 +08:00
parent 4571c84102
commit d31dac75be

View File

@@ -45,7 +45,11 @@ func (this *HTTPRequest) doPage(status int) (shouldStop bool) {
}
func (this *HTTPRequest) doPageLookup(pages []*serverconfigs.HTTPPageConfig, status int) (shouldStop bool) {
var url = this.URL()
for _, page := range pages {
if !page.MatchURL(url) {
continue
}
if page.Match(status) {
if len(page.BodyType) == 0 || page.BodyType == serverconfigs.HTTPPageBodyTypeURL {
if urlSchemeRegexp.MatchString(page.URL) {