summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJosh Gerdes <joshgerdes@gmail.com>2020-10-02 14:52:00 -0500
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-10-02 23:02:38 +0200
commitedc5c4741caaee36ba4d42b5947c195a3e02e6aa (patch)
tree703b927b59eaf15013a27af98a92386e620007c4 /config
parent05e358fd335bcb5c7bdc2783ab0c17ec42667df6 (diff)
tpl: Add Do Not Track (dnt) option to Vimeo shortcode
Added a Vimeo EnableDNT privacy option to the Hugo config. This will enable the Vimeo 'Do Not Track' flag when either Vimeo shortcode tempalte options are used. When enabled, it will force the Vimeo player to be blocked from tracking any session data, including all cookies and stats. Fixes #7700
Diffstat (limited to 'config')
-rw-r--r--config/privacy/privacyConfig.go4
-rw-r--r--config/privacy/privacyConfig_test.go3
2 files changed, 6 insertions, 1 deletions
diff --git a/config/privacy/privacyConfig.go b/config/privacy/privacyConfig.go
index ea34563eb..a36046364 100644
--- a/config/privacy/privacyConfig.go
+++ b/config/privacy/privacyConfig.go
@@ -80,6 +80,10 @@ type Twitter struct {
type Vimeo struct {
Service `mapstructure:",squash"`
+ // When set to true, the Vimeo player will be blocked from tracking any session data,
+ // including all cookies and stats.
+ EnableDNT bool
+
// If simple mode is enabled, only a thumbnail is fetched from i.vimeocdn.com and
// shown with a play button overlaid. If a user clicks the button, he/she will
// be taken to the video page on vimeo.com in a new browser tab.
diff --git a/config/privacy/privacyConfig_test.go b/config/privacy/privacyConfig_test.go
index d798721e1..a750ba282 100644
--- a/config/privacy/privacyConfig_test.go
+++ b/config/privacy/privacyConfig_test.go
@@ -45,6 +45,7 @@ enableDNT = true
simple = true
[privacy.vimeo]
disable = true
+enableDNT = true
simple = true
[privacy.youtube]
disable = true
@@ -63,7 +64,7 @@ simple = true
pc.GoogleAnalytics.RespectDoNotTrack, pc.GoogleAnalytics.AnonymizeIP,
pc.GoogleAnalytics.UseSessionStorage, pc.Instagram.Disable,
pc.Instagram.Simple, pc.Twitter.Disable, pc.Twitter.EnableDNT,
- pc.Twitter.Simple, pc.Vimeo.Disable, pc.Vimeo.Simple,
+ pc.Twitter.Simple, pc.Vimeo.Disable, pc.Vimeo.EnableDNT, pc.Vimeo.Simple,
pc.YouTube.PrivacyEnhanced, pc.YouTube.Disable,
}