Remove the wildcard CORS exception

This commit is contained in:
Marcus Wichelmann 2022-07-08 20:02:46 +02:00
parent 7c7081a3ba
commit 25ded78074
No known key found for this signature in database
GPG key ID: D9FC1B92E557C80D

View file

@ -103,11 +103,6 @@ func New(tmplBox *rice.Box, extraData map[string]string, secret []byte) *echo.Ec
e.Logger.SetLevel(log.DEBUG)
e.Pre(middleware.RemoveTrailingSlash())
e.Use(middleware.Logger())
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: []string{"*"},
AllowHeaders: []string{echo.HeaderOrigin, echo.HeaderContentType, echo.HeaderAccept, echo.HeaderAuthorization},
AllowMethods: []string{echo.GET, echo.HEAD, echo.PUT, echo.PATCH, echo.POST, echo.DELETE},
}))
e.HideBanner = true
e.Validator = NewValidator()
e.Renderer = &TemplateRegistry{