[SSL证书]免费证书申请增加HTTP认证方式

This commit is contained in:
GoEdgeLab
2020-12-03 18:19:28 +08:00
parent ff08a1e6f3
commit 6ef59a8e2f
4 changed files with 48 additions and 1 deletions

View File

@@ -141,6 +141,16 @@ func (this *HTTPRequest) Do() {
// 开始调用
func (this *HTTPRequest) doBegin() {
// 特殊URL处理
if len(this.rawURI) > 1 && this.rawURI[1] == '.' {
// ACME
// TODO 需要配置是否启用ACME检测
if strings.HasPrefix(this.rawURI, "/.well-known/acme-challenge/") {
this.doACME()
return
}
}
// 临时关闭页面
if this.web.Shutdown != nil && this.web.Shutdown.IsOn {
this.doShutdown()