In the whitelist for stub attribution:
https://github.com/mozilla-services/stubattribution/blob/master/attributioncode/sourcewhitelist.go
We the following sources that are whitelisted related to firefox.com:
"firefox-com": true,
"firefox.com": true,
"www.firefox.com": true,
"accounts.firefox.com": true
With the launch of Firefox Screenshots, there is a new domain that we need whitelisted.
That is: screenshots.firefox.com
Would it make more sense to just make firefox.com a regex instead of making a bunch of one-off sub-domains?
Like:
regexp.MustCompile(^(\w+\.)*firefox\.com$
),
If you don't want to a pattern to match firefox.com and all sub-domains, then just add screenshots.firefox.com.
Also, while we are talking about the regexes, shouldn't the the patterns on line 19-24 have their periods escaped?
var sourceWhitelistRegexps = []*regexp.Regexp{
regexp.MustCompile(^[\w-]*.allizom.org$
),
regexp.MustCompile(^www.google(.com?)?.\w+$
),
regexp.MustCompile(^\w+.google.com$
),
regexp.MustCompile(^\w+.search.yahoo.com$
),
regexp.MustCompile(^\w+.facebook.com$
),
regexp.MustCompile(^[\w-]+.wikipedia.org$
),
}
like:
regexp.MustCompile(`^[\w-]*\.allizom\.org$`),
Thanks!