proxyips hinzugefügt
This commit is contained in:
6
app.go
6
app.go
@@ -12,13 +12,15 @@ import (
|
||||
)
|
||||
|
||||
type App struct {
|
||||
r *gin.Engine
|
||||
db *gorm.DB
|
||||
r *gin.Engine
|
||||
proxyips []string
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
func (a *App) start() {
|
||||
a.db.AutoMigrate(&planner.Besucher{})
|
||||
a.r.Use(CORSMiddleware())
|
||||
a.r.SetTrustedProxies(a.proxyips)
|
||||
a.r.NoRoute((func(c *gin.Context) {
|
||||
dir, file := path.Split(c.Request.RequestURI)
|
||||
ext := filepath.Ext(file)
|
||||
|
||||
Reference in New Issue
Block a user