优化ACME读取速度

This commit is contained in:
刘祥超
2021-08-25 17:32:53 +08:00
parent beb251a3cc
commit 6437875979

View File

@@ -12,6 +12,10 @@ func (this *HTTPRequest) doACME() {
// TODO 对请求进行校验,防止恶意攻击
token := filepath.Base(this.RawReq.URL.Path)
if token == "acme-challenge" || len(token) <= 32 {
this.writer.WriteHeader(http.StatusNotFound)
return
}
rpcClient, err := rpc.SharedRPC()
if err != nil {