mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
346 B
Go
17 lines
346 B
Go
package middlewares
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
log "github.com/sirupsen/logrus"
|
|
"github.com/synctv-org/synctv/internal/conf"
|
|
)
|
|
|
|
func Init(e *gin.Engine) {
|
|
e.
|
|
Use(gin.LoggerWithWriter(log.StandardLogger().Out), gin.RecoveryWithWriter(log.StandardLogger().Out)).
|
|
Use(NewCors())
|
|
if conf.Conf.Server.Quic {
|
|
e.Use(NewQuic())
|
|
}
|
|
}
|