mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
autocert: use new OCSP error type (#4437)
This commit is contained in:
parent
9d4d31cb4f
commit
0affd9268b
2 changed files with 7 additions and 4 deletions
|
@ -1,8 +1,9 @@
|
|||
package autocert
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"errors"
|
||||
|
||||
"github.com/caddyserver/certmagic"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
|
||||
|
@ -32,7 +33,7 @@ func (c certMagicLoggerCore) Check(e zapcore.Entry, ce *zapcore.CheckedEntry) *z
|
|||
func (c certMagicLoggerCore) Write(e zapcore.Entry, fs []zapcore.Field) error {
|
||||
fs = append(c.fields, fs...)
|
||||
for _, f := range fs {
|
||||
if f.Type == zapcore.ErrorType && strings.Contains(f.Interface.(error).Error(), "no OCSP server specified in certificate") {
|
||||
if f.Type == zapcore.ErrorType && errors.Is(f.Interface.(error), certmagic.ErrNoOCSPServerSpecified) {
|
||||
// ignore this error message (#4245)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue