-
Notifications
You must be signed in to change notification settings - Fork 395
/
default-disco.js
86 lines (79 loc) · 2.11 KB
/
default-disco.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* This is the default (production) config for the discovery pane app.
*/
import { amoProdCDN } from './lib/shared';
const staticHost = 'https://addons-discovery.cdn.mozilla.net';
module.exports = {
// The keys listed here will be exposed on the client.
// Since by definition client-side code is public these config keys
// must not contain sensitive data.
clientConfigKeys: [
'allowErrorSimulation',
'amoCDN',
'apiHost',
'apiPath',
'apiVersion',
'appName',
'cookieMaxAge',
'cookieName',
'cookieSecure',
'defaultLang',
'discoParamsToUse',
'enableDevTools',
'enableRequestID',
'enableStrictMode',
'experiments',
'hctEnabled',
'hrefLangsMap',
'isDeployed',
'isDevelopment',
'langMap',
'langs',
'loggingLevel',
'publicSentryDsn',
'rtlLangs',
'trackingEnabled',
'trackingId',
'trackingSendInitPageView',
'unsupportedHrefLangs',
],
staticHost,
CSP: {
directives: {
// Script is limited to the discovery specific CDN.
scriptSrc: [
staticHost,
'https://www.google-analytics.com/analytics.js',
],
styleSrc: [staticHost],
imgSrc: [
"'self'",
'data:',
amoProdCDN,
staticHost,
'https://www.google-analytics.com',
],
mediaSrc: [staticHost],
},
},
// Firefox sets these query params when loading the Discovery Pane.
// These are the allowed list of query params we will forward to AMO for statistics.
discoParamsToUse: [
'branch',
'clientId',
'edition',
'platform',
'study',
],
trackingEnabled: true,
trackingId: 'UA-36116321-7',
// We override the initial page view call in order to
// add custom dimension data.
trackingSendInitPageView: false,
// This is disabled for the disco pane because Firefox is the only target
// so we don't need auto-prefixing, etc.
enablePostCssLoader: false,
po2jsonFuzzyOutput: false,
// https://sentry.prod.mozaws.net/operations/addons-frontend-disco-prod/
publicSentryDsn: 'https://b9e70d0dca144344a7a5674c29b08355@sentry.prod.mozaws.net/186',
};