Merge pull request 'Add "AUTH_TYPE" environment variable when client cert is present' (#14) from khuxkm/molly-brown:master into master
Reviewed-on: https://tildegit.org/solderpunk/molly-brown/pulls/14
This commit is contained in:
commit
3d4d830e98
1 changed files with 2 additions and 0 deletions
|
@ -191,6 +191,8 @@ func prepareGatewayVariables(config Config, URL *url.URL, conn net.Conn) map[str
|
||||||
vars["TLS_CLIENT_ISSUER_CN"] = cert.Issuer.CommonName
|
vars["TLS_CLIENT_ISSUER_CN"] = cert.Issuer.CommonName
|
||||||
vars["TLS_CLIENT_SUBJECT"] = cert.Subject.String()
|
vars["TLS_CLIENT_SUBJECT"] = cert.Subject.String()
|
||||||
vars["TLS_CLIENT_SUBJECT_CN"] = cert.Subject.CommonName
|
vars["TLS_CLIENT_SUBJECT_CN"] = cert.Subject.CommonName
|
||||||
|
// To make it easier to detect when a cert is present
|
||||||
|
vars["AUTH_TYPE"] = "Certificate"
|
||||||
}
|
}
|
||||||
return vars
|
return vars
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue