This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
85 lines (84 loc) · 3.29 KB
/
config.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
const env = process.env.APP__ENV_NAME || "local";
const isLocal = env === "local" || env === "test";
export default {
isLocalEnv: isLocal,
httpPort: process.env.PORT || 80,
proxyDomain: "", // Domain to proxy calls through. Leave it empty to use the requested domain as a proxy domain
proxy: { // Proxy configuration is here
domains: [ // These domains are replaced in any proxied response (including scripts, URLs and redirects)
"adservice.google.com",
"www.google-analytics.com",
"www.googleadservices.com",
"www.googletagmanager.com",
"google-analytics.bi.owox.com",
"googleads.g.doubleclick.net",
"stats.g.doubleclick.net",
"ampcid.google.com",
"www.google.%",
"www.google.com",
"bat.bing.com",
"static.hotjar.com",
"trackcmp.net",
"connect.facebook.net",
"www.facebook.com",
"rum-static.pingdom.net",
"s.adroll.com",
"d.adroll.com",
"bid.g.doubleclick.net",
"rum-collector-2.pingdom.net",
"script.hotjar.com",
"vars.hotjar.com",
"pixel.advertising.com",
"dsum-sec.casalemedia.com",
"pixel.rubiconproject.com",
"sync.outbrain.com",
"simage2.pubmatic.com",
"trc.taboola.com",
"eb2.3lift.com",
"ads.yahoo.com",
"x.bidswitch.net",
"ib.adnxs.com",
"idsync.rlcdn.com",
"us-u.openx.net",
"cm.g.doubleclick.net"
],
specialContentReplace: { // Special regex rules for domains
"www.googletagmanager.com": [
{
regex: /"https\:\/\/s","http:\/\/a","\.adroll\.com/,
replace: ({ host }) => `"https://${ host }/s","http://${ host }/a",".adroll.com`
}
],
"eb2.3lift.com": [
{ // Because eb2.3lift.com/xuid?mid=_&xuid=_&dongle=_ redirects to "/xuid" which doesn't exists
regex: /^\/xuid/,
replace: "https://eb2.3lift.com/xuid" // eb2.3lift.com is replaced then again with the correct proxy
}
]
},
ipOverrides: { // IP override rules for domains
"google-analytics.bi.owox.com": { // Currently, this is useless as owox.com is having problems with overriding IP addresses, even though they state that they support everything from the Google Measurement Protocol.
urlMatch: /\/collect/,
queryParameterName: ["uip", "device.ip"]
},
"www.google-analytics.com": {
urlMatch: /\/collect/,
queryParameterName: "uip"
}
},
maskPaths: [ // Paths which are masked in URLs and redirects in order to avoid firing ad-blocking rules
"/google-analytics",
"/r/collect",
"/j/collect",
"/pageread/conversion",
"/pagead/conversion",
"/googleads",
"/prum",
"/beacon",
"/pixel",
"/AdServer",
"/ads/",
"openx\\."
],
}
};