Merge pull request #25 from RAnders00/patch-1
Added X-Content-Type-Options: nosniff to all responses
This commit is contained in:
commit
7fce808b04
1 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,13 @@ func (s *Server) Init() {
|
|||
e.Use(middleware.RemoveTrailingSlashWithConfig(middleware.TrailingSlashConfig{
|
||||
RedirectCode: http.StatusMovedPermanently,
|
||||
}))
|
||||
e.Use(middleware.SecureWithConfig(middleware.SecureConfig{
|
||||
XSSProtection: "", // disabled
|
||||
ContentTypeNosniff: "nosniff",
|
||||
XFrameOptions: "", // disabled
|
||||
HSTSMaxAge: 0, // disabled
|
||||
ContentSecurityPolicy: "", // disabled
|
||||
}))
|
||||
e.Use(middleware.CORSWithConfig(DefaultCORSConfig))
|
||||
|
||||
e.GET("/", func(c echo.Context) error {
|
||||
|
|
Loading…
Reference in a new issue