多个提示页面增加请求ID、增加变量支持

This commit is contained in:
GoEdgeLab
2021-12-02 14:46:40 +08:00
parent e9133859be
commit c9408fcd97
5 changed files with 11 additions and 10 deletions

View File

@@ -88,6 +88,12 @@ func (this *HTTPRequest) doPage(status int) (shouldStop bool) {
return true
} else if page.BodyType == shared.BodyTypeHTML {
// 这里需要实现设置Status因为在Format()中可以获取${status}等变量
if page.NewStatus > 0 {
this.writer.statusCode = page.NewStatus
} else {
this.writer.statusCode = status
}
var content = this.Format(page.Body)
// 修改状态码