These are chat archives for gin-gonic/gin

21st
Dec 2016
Coding Concepts
@codingconcepts
Dec 21 2016 08:21
Hi all, I'd like to provide my own TLSConfig to Gin. Would someone please point me in the right direction?
Thomas Boerger
@tboerger
Dec 21 2016 09:34
You can launch gin with the stdlib, there you can provide a custom tls config, you will find enough examples like https://github.com/drone/drone/blob/master/drone/server.go#L305
Ok, this just used ListenAndServeTLS but still a good example for stdlib usage
Coding Concepts
@codingconcepts
Dec 21 2016 09:36
Hi Thomas, this is great, thank you very much :)
Thomas Boerger
@tboerger
Dec 21 2016 09:37
https://gist.github.com/denji/12b3a568f092ab951456 for the stdlib custom tls config
Yw
Coding Concepts
@codingconcepts
Dec 21 2016 09:46

As far as the configuration of the server with TLS is concerned, I've actually got a server running (using the stdlib), automatically obtaining a Let's Encrypt certificate. It's just the plumbing into Gin I was scratching my head about!

Here's my example server: https://github.com/codingconcepts/pocs/blob/master/web/ssl/main.go

Thomas Boerger
@tboerger
Dec 21 2016 10:28
Cool, I wanted to integrate le as well
Or just use the autocert