feat!: listen to both http & https (#4536)
Co-authored-by: Andy Hsu <i@nn.ci>
This commit is contained in:
@ -21,6 +21,9 @@ func Init(e *gin.Engine) {
|
||||
}
|
||||
Cors(e)
|
||||
g := e.Group(conf.URL.Path)
|
||||
if conf.Conf.Scheme.Https && conf.Conf.Scheme.ForceHttps && !conf.Conf.Scheme.DisableHttp {
|
||||
g.Use(middlewares.ForceHttps)
|
||||
}
|
||||
g.Any("/ping", func(c *gin.Context) {
|
||||
c.String(200, "pong")
|
||||
})
|
||||
|
Reference in New Issue
Block a user