Security middlewares for Gin (gin-gonic/gin
) inspired by the popular helmet
middleware package for Node JS express
and koa
.
Add the Default
middleware for basic security measures.
s := gin.New()
s.Use(helmet.Default())
You can also add each middleware separately:
s.Use(helmet.NoCache())
Those not included in the Default()
middleware are considered more advanced and require consideration before using.
See the godoc for more info and examples.