forked from EFForg/https-everywhere
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Amazon.xml
127 lines (90 loc) · 3.44 KB
/
Amazon.xml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!--
Other Amazon rulesets:
- Amazon-Associates.xml
- AmazonAWS.xml
- Amazon_EU.xml
- Amazon_JP.xml
- Assoc-Amazon.com.xml
This rule is off by default because it caused so many aspects of the
Amazon site to break; see the mailing list archives for details.
Currently being fixed...
Amazon appears to operate in 7 countries, and does not hold the domains
for some others, like .se or .be. In other cases there is an http-only site
that redirects to one of these 7 countries.
amazon.com:
Does work:
- ap/ (appears to be purchase-management related)
- ([\w-]+/)?dp/ (i.e. dp/ possibly preceeded by title)
- e/\w{10,10}/ (i.e. e/ followed by ASIN)
- gp/cart
- gp/css
- gp/feature.html
- gp/redirect.html
- gp/registry/wishlist
Doesn't work:
- $ (i.e. homepage)
- ([\w-]+/)?b/ (i.e. b/ preceeded by category)
- exec/obidos/ASIN/
- ([\w-]+/)gp/ (i.e. gp/ possibly preceeded by title)
- gp/goldbox($|\?)
- gp/kindle/pc($|\?)
- gp/pdp/profile($|\?)
- gp/product/
- gp/richpub/syltguides/byauthor($|\?)
- Help/
- l/
- s/
amazon.cn:
Doesn't work:
- Everything?
amazon.ca:
Does work:
everything except...
Doesn't work:
/mn/search/
Partially covered domains:
- askville.amazon.com (pages redirect to SendToHttp.do)
-->
<ruleset name="Amazon (broken)" default_off="breaks Look Inside the Book">
<target host="amazon.ca" />
<target host="www.amazon.ca" />
<target host="amazon.cn" />
<target host="www.amazon.cn" />
<target host="amazon.com" />
<target host="askville.amazon.com" />
<exclusion pattern="^http://askville\.amazon\.com/(?!css/)" />
<target host="developer.amazon.com" />
<target host="local.amazon.com" />
<target host="www.amazon.com" />
<!--
These pages don't work on .com:
-->
<exclusion pattern="^http://www\.amazon\.com/(?:$|\?|exec/obidos/|gp/(?:(?:goldbox|kindle/pc|pdp/profile|richpub/syltguides/byauthor)(?:$|\?)|product/)|l/|(?:[\w\-]+/)?(?:b|dp|Help)/)" />
<!--
- ajaxv2: Breaks adding to basket for products with options
- dynamic-update: Breaks image zoom
-->
<exclusion pattern="^http://(?:www\.)?amazon\.com/gp/twister/(?:ajaxv2|dynamic-update/)" />
<!--
Search redirects to http, for all sites.
-->
<exclusion pattern="^http://www\.amazon\.[\w\.]+/(?:gp/search\?|mn/search(?:$|\?)|s(?:/|\?rh=))" />
<!-- Verified as working for UK, ca appears to function identically.
Unfortunately, navigating to an unsecured page wipes one's shopping basket :(
This is problem with our handling of secure cookies, wherein we treat
secure and non-secure cookies with the same ID as one cookie, instead of two.
If our handling were correct, this securecookie rule would have only
one problem, namely that basket information would be missing on search pages.
<securecookie host="^(www)?\.amazon\.ca$" name=".+" />
These cookies are set all over .com:
<securecookie host="^\.amazon\.com$" name="^session-id(-time)?$" />
These cookies are set by gp/cart/view.html
<securecookie host="\.amazon\.com$" name="^(session-token|ubid-main)$"/-->
<securecookie host="^local\.amazon\.com$" name=".+" />
<rule from="^http://(?:www\.)?amazon\.c(a|n|om)/mn/search/uedata/"
to="https://www.amazon.c$1/uedata/" />
<rule from="^http://(?:www\.)?amazon\.c(a|n|om)/"
to="https://www.amazon.c$1/" />
<rule from="^http://(askville|developer|local)\.amazon\.com/"
to="https://$1.amazon.com/" />
</ruleset>