-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhosts.go
77 lines (75 loc) · 3.13 KB
/
hosts.go
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
package main
var allowdHosts = map[string]bool{
"distillery.s3.amazonaws.com": true,
"distilleryimage0.s3.amazonaws.com": true,
"distilleryimage1.s3.amazonaws.com": true,
"distilleryimage10.s3.amazonaws.com": true,
"distilleryimage11.s3.amazonaws.com": true,
"distilleryimage2.s3.amazonaws.com": true,
"distilleryimage3.s3.amazonaws.com": true,
"distilleryimage4.s3.amazonaws.com": true,
"distilleryimage5.s3.amazonaws.com": true,
"distilleryimage6.s3.amazonaws.com": true,
"distilleryimage7.s3.amazonaws.com": true,
"distilleryimage8.s3.amazonaws.com": true,
"distilleryimage9.s3.amazonaws.com": true,
"igcdn-photos-a-a.akamaihd.net": true,
"igcdn-photos-b-a.akamaihd.net": true,
"igcdn-photos-c-a.akamaihd.net": true,
"igcdn-photos-d-a.akamaihd.net": true,
"igcdn-photos-e-a.akamaihd.net": true,
"igcdn-photos-f-a.akamaihd.net": true,
"igcdn-photos-g-a.akamaihd.net": true,
"igcdn-photos-h-a.akamaihd.net": true,
"igcdn-photos-i-a.akamaihd.net": true,
"igcdn-photos-j-a.akamaihd.net": true,
"igcdn-photos-k-a.akamaihd.net": true,
"igcdn-photos-l-a.akamaihd.net": true,
"igcdn-photos-m-a.akamaihd.net": true,
"igcdn-photos-n-a.akamaihd.net": true,
"igcdn-photos-o-a.akamaihd.net": true,
"igcdn-photos-p-a.akamaihd.net": true,
"igcdn-photos-q-a.akamaihd.net": true,
"igcdn-photos-r-a.akamaihd.net": true,
"igcdn-photos-s-a.akamaihd.net": true,
"igcdn-photos-t-a.akamaihd.net": true,
"igcdn-photos-u-a.akamaihd.net": true,
"igcdn-photos-v-a.akamaihd.net": true,
"igcdn-photos-w-a.akamaihd.net": true,
"igcdn-photos-x-a.akamaihd.net": true,
"images.ak.instagram.com": true,
"instagramimages-a.akamaihd.net": true,
"instagramimages-b.akamaihd.net": true,
"instagramimages-c.akamaihd.net": true,
"instagramimages-d.akamaihd.net": true,
"instagramimages-e.akamaihd.net": true,
"instagramimages-f.akamaihd.net": true,
"instagramimages-g.akamaihd.net": true,
"instagramimages-h.akamaihd.net": true,
"instagramimages-i.akamaihd.net": true,
"instagramimages-j.akamaihd.net": true,
"instagramimages-k.akamaihd.net": true,
"origincache-ash.fbcdn.net": true,
"origincache-frc.fbcdn.net": true,
"origincache-prn.fbcdn.net": true,
"photos-a.ak.instagram.com": true,
"photos-b.ak.instagram.com": true,
"photos-c.ak.instagram.com": true,
"photos-d.ak.instagram.com": true,
"photos-e.ak.instagram.com": true,
"photos-f.ak.instagram.com": true,
"photos-g.ak.instagram.com": true,
"photos-h.ak.instagram.com": true,
"scontent-a.cdninstagram.com": true,
"scontent-b.cdninstagram.com": true,
"scontent-c.cdninstagram.com": true,
"scontent-d.cdninstagram.com": true,
"scontent-e.cdninstagram.com": true,
"scontent-f.cdninstagram.com": true,
"scontent.cdninstagram.com": true,
// "zhinsta.com:8080": true, // for debug
}
func isHostAllowed(host string) bool {
_, ok := allowdHosts[host]
return ok
}