修复临时关闭页面内容切换到HTML无法使用的问题

This commit is contained in:
GoEdgeLab
2022-03-31 15:17:30 +08:00
parent 2503a7663f
commit 899f977473

View File

@@ -17,12 +17,13 @@ func (this *HTTPRequest) doShutdown() {
return
}
if urlPrefixRegexp.MatchString(shutdown.URL) { // URL
this.doURL(http.MethodGet, shutdown.URL, "", shutdown.Status, true)
return
}
if len(shutdown.BodyType) == 0 || shutdown.BodyType == shared.BodyTypeURL {
// URL
if urlPrefixRegexp.MatchString(shutdown.URL) {
this.doURL(http.MethodGet, shutdown.URL, "", shutdown.Status, true)
return
}
// URL为空则显示文本
if len(shutdown.URL) == 0 {
// 自定义响应Headers