Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(216)

Side by Side Diff: json_rules.txt

Issue 114560043: Create rules to match urls Base URL: https://github.com/maryruthven/web-page-replay.git@master
Patch Set: adding isinstance checks Created 11 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 [
wrightt 2014/08/12 16:01:39 wrap file to 80 lines max width, if possible.
2 ["_comment",
wrightt 2014/08/12 16:01:39 hmm, maybe also allow "# blah ..." <--
3 "[predicate, predicate_args, action, action_args] ",
4 "predicate: urlMatches ",
5 "predicate_args: A list of url regexes. These dont include the http(s):// pref ixes. ",
6 " removeGroupsFromURL - the url with the groups to remove should enclosed b y parenthesis.",
7 " ex: with foo.com/bar=([0-9]) foo.com/bar=8 -> foo.com/bar= ",
8 "supported actions: replaceCallback, removeGroupsFromURL, sendStatus, removeHe ader ",
9 "action_args: Optional. ",
10 " sendStatus - the response status code to send for the url. ",
11 " removeHeaders - the header to exclued for that url. "
12 ],
13 ["_comment", "Example rules for google search, bing search, and google search o n an idevice."],
wrightt 2014/08/12 16:01:39 add whitespace to group file into gws/bing/maps se
14 ["urlMatches", ["mts0\\.google\\.com/vt.*callback.*", "mts0\\.google\\.com/maps /vt.*callback.*"],
15 "replaceCallback"],
16 ["urlMatches", ["gg\\.google\\.com/csi.*jsv(.*)"],
wrightt 2014/08/12 16:01:39 allow single pred_arg string, e.g.: ["urlMatche
17 "removeGroupsFromURL"],
18 ["urlMatches", ["mts0\\.google\\.com/vt.*callback=_xdc_\\._(.{9})"],
19 "removeGroupsFromURL"],
20 ["urlMatches", ["maps\\.gstatic\\.com(.*)/mapfiles/transparent\\.png", "maps\\. gstatic\\.com/mapfiles(.*)/shadow50\\.png",
21 "maps\\.gstatic\\.com/mapfiles/markers2/red(_grow)_markers_A_J2\\.png"],
22 "removeGroupsFromURL"],
23 ["urlMatches", ["www\\.google\\.com/gen_204.*(&rtr=[^&]*)&?.*","www\\.google\\. com/gen_204.*(&xjs=[^&]*)&?.*"],
24 "removeGroupsFromURL"],
25 ["urlMatches", ["tools\\.google\\.com/service/update2.*"],
26 "sendStatus", 204],
27 ["urlMatches", ["clients1\\.google\\.com/generate_204.*"],
28 "sendStatus", 204],
29 ["urlMatches", ["[0-9a-z-]*\\.metric\\.gstatic\\.com/gen_204.*"],
30 "sendStatus", 204],
31 ["urlMatches", ["maptiles-dogfood.\\.sandbox\\.google\\.com"],
32 "sendStatus", 204],
33 ["urlMatches", [".*\\.google\\.com/client_204.*", ".*\\.google\\.com/.*gen_204. *", ".*\\.google\\.com/log204.*"],
34 "sendStatus", 204],
35 ["urlMatches", [".*/maps/preview/log204"],
wrightt 2014/08/12 16:01:38 add TODO comment re: needs host name.
36 "removeHeader", "cache-control"],
37
38 ["urlMatches", ["www\\.bing\\.com/.*lsp\\.aspx"],
39 "sendStatus", 204],
40
41 ["urlMatches", [".*apple\\..*/.*"],
wrightt 2014/08/12 16:01:39 Nit: use "[^/]*apple", to avoid matching "google.c
42 "sendStatus", 204],
43 ["urlMatches", ["configuration\\.apple\\.com/configurations/pep/pipeline/.*"],
44 "sendStatus", 204]
45 ]
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b