feat: optimize return value in pkg modifier (#17655)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2022-10-21 15:38:39 +08:00 committed by GitHub
parent 486bdb6b99
commit 81f618fb9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -42,6 +42,6 @@ func (s *SecretAuthorizer) Modify(req *http.Request) error {
if req == nil {
return errors.New("the request is null")
}
err := secret.AddToRequest(req, s.secret)
return err
return secret.AddToRequest(req, s.secret)
}

View File

@ -43,8 +43,7 @@ func InternalEnableVerifyClientCert() bool {
func GetInternalCertPair() (tls.Certificate, error) {
crtPath := os.Getenv(internalTLSCertPath)
keyPath := os.Getenv(internalTLSKeyPath)
cert, err := tls.LoadX509KeyPair(crtPath, keyPath)
return cert, err
return tls.LoadX509KeyPair(crtPath, keyPath)
}
// GetInternalTLSConfig return a tls.Config for internal https communicate