Log TLS client subject
This commit is contained in:
parent
630de7481e
commit
27c02b5a56
4 changed files with 13 additions and 0 deletions
|
@ -218,6 +218,9 @@ func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request, next http
|
|||
core[RequestScheme] = "https"
|
||||
core[TLSVersion] = traefiktls.GetVersion(req.TLS)
|
||||
core[TLSCipher] = traefiktls.GetCipherName(req.TLS)
|
||||
if len(req.TLS.PeerCertificates) > 0 && req.TLS.PeerCertificates[0] != nil {
|
||||
core[TLSClientSubject] = req.TLS.PeerCertificates[0].Subject.String()
|
||||
}
|
||||
}
|
||||
|
||||
core[ClientAddr] = req.RemoteAddr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue