健康检查
(key string, isHealthCheck *bool)
| 10 | |
| 11 | // 健康检查 |
| 12 | func (this *HTTPRequest) doHealthCheck(key string, isHealthCheck *bool) (stop bool) { |
| 13 | this.tags = append(this.tags, "healthCheck") |
| 14 | |
| 15 | this.RawReq.Header.Del(serverconfigs.HealthCheckHeaderName) |
| 16 | |
| 17 | data, err := nodeutils.Base64DecodeMap(key) |
| 18 | if err != nil { |
| 19 | remotelogs.Error("HTTP_REQUEST_HEALTH_CHECK", "decode key failed: "+err.Error()) |
| 20 | return |
| 21 | } |
| 22 | *isHealthCheck = true |
| 23 | |
| 24 | this.web.StatRef = nil |
| 25 | |
| 26 | if !data.GetBool("accessLogIsOn") { |
| 27 | this.disableLog = true |
| 28 | } |
| 29 | |
| 30 | if data.GetBool("onlyBasicRequest") { |
| 31 | return true |
| 32 | } |
| 33 | |
| 34 | return |
| 35 | } |