mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 04:10:27 +08:00
限制TCP和UDP网站操作HTTP网站的功能
This commit is contained in:
@@ -169,3 +169,14 @@ func (this *ParentAction) FailLang(messageCode langs.MessageCode, args ...any) {
|
||||
func (this *ParentAction) FailFieldLang(field string, messageCode langs.MessageCode, args ...any) {
|
||||
this.FailField(field, langs.Message(this.LangCode(), messageCode, args...))
|
||||
}
|
||||
|
||||
func (this *ParentAction) FilterHTTPFamily() bool {
|
||||
if this.Data.GetString("serverFamily") == "http" {
|
||||
return false
|
||||
}
|
||||
|
||||
this.ResponseWriter.WriteHeader(http.StatusNotFound)
|
||||
_, _ = this.ResponseWriter.Write([]byte("page not found"))
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user