linting + organizing

This commit is contained in:
tsmethurst 2021-04-20 18:14:23 +02:00
commit dafc3b5b92
60 changed files with 746 additions and 390 deletions

View file

@ -20,8 +20,9 @@ package security
import "github.com/gin-gonic/gin"
// flocBlock prevents google chrome cohort tracking by writing the Permissions-Policy header after all other parts of the request have been completed.
// FlocBlock is a middleware that prevents google chrome cohort tracking by
// writing the Permissions-Policy header after all other parts of the request have been completed.
// See: https://plausible.io/blog/google-floc
func (m *module) flocBlock(c *gin.Context) {
func (m *Module) FlocBlock(c *gin.Context) {
c.Header("Permissions-Policy", "interest-cohort=()")
}