Question description
I do not have certificate files, but have Let's Encrypt
What I need to host on https with tls?
According to use inside FastHttp, I believe that you can be based on e.g. below:
I saw these two examples:
https://github.com/valyala/fasthttp/issues/167
https://github.com/valyala/fasthttp/issues/431
Tnx, I'll see tomorrow morning
Hi @Terisback v1.8.2 will support custom TLS configs
package main
import (
"crypto/tls"
"github.com/gofiber/fiber"
)
func main() {
app := fiber.New()
app.Get("/", func(c *fiber.Ctx) {
c.Send(c.Protocol()) // => https
})
cer, err := tls.LoadX509KeyPair("certs/ssl.cert", "certs/ssl.key")
if err != nil {
log.Fatal(err)
}
config := &tls.Config{Certificates: []tls.Certificate{cer}}
// Start server with https/ssl enabled
app.Listen(443, config)
}
Most helpful comment
Hi @Terisback
v1.8.2will support custom TLS configs