You've already forked golang-base-project
Initial commit
This commit is contained in:
14
middleware/sensitive.go
Normal file
14
middleware/sensitive.go
Normal file
@ -0,0 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// Sensitive middleware handles headers that should be set for routes that may contain sensitive data such as personal information
|
||||
func Sensitive() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.Header("Cache-control", "no-store")
|
||||
c.Header("Pragma", "no-cache")
|
||||
c.Next()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user