raven-go
raven-go copied to clipboard
Add environment variable switch for certificates.
Since the DefaultClient is created at package initialize phase, the only way to put this switch is environment variable.
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.
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
Hi @mattrobenolt
Do you have any plans to merge this PR? This PR is very helpful with self-signed-ceritificates.
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".