summaryrefslogtreecommitdiff
path: root/internal/apimodule/security/flocblock.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-04-20 18:14:23 +0200
committerLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-04-20 18:14:23 +0200
commitdafc3b5b92865b97be48456e02ad235f4c79cf4e (patch)
tree0f97edf4377f406df321054d26e731ff5dcc6667 /internal/apimodule/security/flocblock.go
parentApi/v1/statuses (#11) (diff)
downloadgotosocial-dafc3b5b92865b97be48456e02ad235f4c79cf4e.tar.xz
linting + organizing
Diffstat (limited to 'internal/apimodule/security/flocblock.go')
-rw-r--r--internal/apimodule/security/flocblock.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/apimodule/security/flocblock.go b/internal/apimodule/security/flocblock.go
index 4bb011d4d..7cedcde6b 100644
--- a/internal/apimodule/security/flocblock.go
+++ b/internal/apimodule/security/flocblock.go
@@ -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=()")
}