raven-go icon indicating copy to clipboard operation
raven-go copied to clipboard

Add environment variable switch for certificates.

Open LeonLiuY opened this issue 6 years ago • 4 comments

Since the DefaultClient is created at package initialize phase, the only way to put this switch is environment variable.

LeonLiuY avatar Sep 26 '17 08:09 LeonLiuY

Could we not expose a method to set them? I imagine people also wanted to just explicitly give the certs to use. So something like, client.SetRootCA() or something.

mattrobenolt avatar Sep 26 '17 17:09 mattrobenolt

client.Transport is an interface with only 1 method Send. I have 2 choices:

  • cast it to http.Transport.
  • recreate another http.Transport.

Neither is good smell to me. But I implemented the latter.

PR is updated

LeonLiuY avatar Sep 27 '17 09:09 LeonLiuY

Hi @mattrobenolt

Do you have any plans to merge this PR? This PR is very helpful with self-signed-ceritificates.

kwargs avatar May 18 '18 18:05 kwargs

If we're still committed to this being a good (enough) implementation I'm happy to get this merged. In general it seems fine to me, and is probably nicer than an env variable. I do know the env variable pattern does exist elsewhere, but usually its for general "load certs from here".

dcramer avatar Oct 23 '18 19:10 dcramer