mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 01:50:27 +08:00
找不到匹配的域名时可以指定默认域名、指定不匹配时的处理动作
This commit is contained in:
@@ -1,3 +1,32 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
|
||||
/**
|
||||
* 域名不匹配动作
|
||||
*/
|
||||
this.domainMismatchAction = "page"
|
||||
|
||||
this.domainMismatchActionPageOptions = {
|
||||
statusCode: 404,
|
||||
contentHTML: `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>404 not found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h4>找不到您要访问的页面.</h4>
|
||||
<h4>Sorry, page not found.</h4>
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
}
|
||||
if (this.globalConfig.httpAll.domainMismatchAction != null) {
|
||||
this.domainMismatchAction = this.globalConfig.httpAll.domainMismatchAction.code
|
||||
|
||||
if (this.domainMismatchAction == "page") {
|
||||
this.domainMismatchActionPageOptions = this.globalConfig.httpAll.domainMismatchAction.options;
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user