mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-06 18:10:26 +08:00
修复校验ACME证书时受自动跳转等设置的影响的问题
This commit is contained in:
@@ -126,6 +126,17 @@ func (this *HTTPRequest) Do() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 特殊URL处理
|
||||||
|
if len(this.rawURI) > 1 && this.rawURI[1] == '.' {
|
||||||
|
// ACME
|
||||||
|
// TODO 需要配置是否启用ACME检测
|
||||||
|
if strings.HasPrefix(this.rawURI, "/.well-known/acme-challenge/") {
|
||||||
|
this.doACME()
|
||||||
|
this.doEnd()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WAF
|
// WAF
|
||||||
if this.web.FirewallRef != nil && this.web.FirewallRef.IsOn {
|
if this.web.FirewallRef != nil && this.web.FirewallRef.IsOn {
|
||||||
if this.doWAFRequest() {
|
if this.doWAFRequest() {
|
||||||
@@ -167,16 +178,6 @@ func (this *HTTPRequest) Do() {
|
|||||||
|
|
||||||
// 开始调用
|
// 开始调用
|
||||||
func (this *HTTPRequest) doBegin() {
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理健康检查
|
// 处理健康检查
|
||||||
var healthCheckKey = this.RawReq.Header.Get(serverconfigs.HealthCheckHeaderName)
|
var healthCheckKey = this.RawReq.Header.Get(serverconfigs.HealthCheckHeaderName)
|
||||||
if len(healthCheckKey) > 0 {
|
if len(healthCheckKey) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user