mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-09 03:50:27 +08:00
修复状未绑定域名中${status}和${statusMessage}变量值
This commit is contained in:
@@ -49,6 +49,7 @@ func (this *HTTPRequest) doMismatch() {
|
|||||||
|
|
||||||
// 是否正在访问IP
|
// 是否正在访问IP
|
||||||
if globalServerConfig.HTTPAll.NodeIPShowPage && net.ParseIP(this.ReqHost) != nil {
|
if globalServerConfig.HTTPAll.NodeIPShowPage && net.ParseIP(this.ReqHost) != nil {
|
||||||
|
this.writer.statusCode = statusCode
|
||||||
var contentHTML = this.Format(globalServerConfig.HTTPAll.NodeIPPageHTML)
|
var contentHTML = this.Format(globalServerConfig.HTTPAll.NodeIPPageHTML)
|
||||||
this.writer.Header().Set("Content-Type", "text/html; charset=utf-8")
|
this.writer.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
this.writer.Header().Set("Content-Length", types.String(len(contentHTML)))
|
this.writer.Header().Set("Content-Length", types.String(len(contentHTML)))
|
||||||
@@ -73,6 +74,7 @@ func (this *HTTPRequest) doMismatch() {
|
|||||||
// 处理当前连接
|
// 处理当前连接
|
||||||
if mismatchAction != nil && mismatchAction.Code == "page" {
|
if mismatchAction != nil && mismatchAction.Code == "page" {
|
||||||
if mismatchAction.Options != nil {
|
if mismatchAction.Options != nil {
|
||||||
|
this.writer.statusCode = statusCode
|
||||||
var contentHTML = this.Format(mismatchAction.Options.GetString("contentHTML"))
|
var contentHTML = this.Format(mismatchAction.Options.GetString("contentHTML"))
|
||||||
this.writer.Header().Set("Content-Type", "text/html; charset=utf-8")
|
this.writer.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
this.writer.Header().Set("Content-Length", types.String(len(contentHTML)))
|
this.writer.Header().Set("Content-Length", types.String(len(contentHTML)))
|
||||||
|
|||||||
Reference in New Issue
Block a user