mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-06 07:45:47 +08:00
增加防盗链拦截时默认提示文字
This commit is contained in:
@@ -18,7 +18,7 @@ func (this *HTTPRequest) doRequestLimit() (shouldStop bool) {
|
||||
// TODO 处理分片提交的内容
|
||||
if this.web.RequestLimit.MaxBodyBytes() > 0 &&
|
||||
this.RawReq.ContentLength > this.web.RequestLimit.MaxBodyBytes() {
|
||||
this.writeCode(http.StatusRequestEntityTooLarge)
|
||||
this.writeCode(http.StatusRequestEntityTooLarge, "", "")
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func (this *HTTPRequest) doRequestLimit() (shouldStop bool) {
|
||||
clientConn, ok := requestConn.(ClientConnInterface)
|
||||
if ok && !clientConn.IsBound() {
|
||||
if !clientConn.Bind(this.ReqServer.Id, this.requestRemoteAddr(true), this.web.RequestLimit.MaxConns, this.web.RequestLimit.MaxConnsPerIP) {
|
||||
this.writeCode(http.StatusTooManyRequests)
|
||||
this.writeCode(http.StatusTooManyRequests, "", "")
|
||||
this.Close()
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user