mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-06-06 00:37:24 +03:00
Mitigate CSRF attacks (#206)
This commit is contained in:
parent
97652be545
commit
031d2cb7e8
4 changed files with 47 additions and 33 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue