feat!: support listen to the unix (close #4671)

Starting from this commit, the HTTP server related config all move to the scheme
This commit is contained in:
Andy Hsu
2023-07-04 17:56:02 +08:00
parent 59dbf4496f
commit 7d20a01dba
4 changed files with 53 additions and 24 deletions

View File

@ -21,7 +21,7 @@ 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 {
if conf.Conf.Scheme.HttpPort != -1 && conf.Conf.Scheme.HttpsPort != -1 && conf.Conf.Scheme.ForceHttps {
g.Use(middlewares.ForceHttps)
}
g.Any("/ping", func(c *gin.Context) {