mirror of
https://gitee.com/johng/gf
synced 2026-07-05 21:32:17 +08:00
add TLSConfig support for ghttp.Server
This commit is contained in:
@ -9,7 +9,7 @@ func main() {
|
||||
s.BindHandler("/", func(r *ghttp.Request){
|
||||
r.Response.Writeln("来自于HTTPS的:哈喽世界!")
|
||||
})
|
||||
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
|
||||
s.EnableHTTPS("./server.crt", "./server.key")
|
||||
s.SetPort(8199)
|
||||
s.Run()
|
||||
}
|
||||
Reference in New Issue
Block a user