Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/adblockplusorg/files/adblockplus.org

Issue 9170066: Don't use firefox as the default user agent (Closed)
Left Patch Set: Created Jan. 9, 2013, 3:13 p.m.
Right Patch Set: Created Jan. 10, 2013, 4:48 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 server { 1 server {
2 root /var/www/adblockplus.org/httpdocs; 2 root /var/www/adblockplus.org/httpdocs;
3 3
4 location / { 4 location / {
5 index index.php index index.html; 5 index index.php index index.html;
6 6
7 if ($arg_a = "view") { 7 if ($arg_a = "view") {
8 rewrite ^(.*) $1? permanent; 8 rewrite ^(.*) $1? permanent;
9 } 9 }
10 10
11 set $preferredLang en; 11 set $preferredLang en;
12 if ($http_accept_language ~ ^(\w\w)\b) { 12 if ($http_accept_language ~ ^(\w\w)\b) {
13 set $preferredLang $1; 13 set $preferredLang $1;
14 } 14 }
15 if (!-f $document_root/static/$preferredLang/index) { 15 if (!-f $document_root/static/$preferredLang/index) {
16 set $preferredLang en; 16 set $preferredLang en;
17 } 17 }
18 18
19 set $user_agent ""; 19 set $user_agent "";
20 if ($http_user_agent ~ \bFirefox/\d+) { 20 if ($http_user_agent ~ \bGecko/\d+) {
Wladimir Palant 2013/01/09 18:42:08 Not Firefox/\d+ but Gecko/d+ please.
Felix Dahlke 2013/01/10 04:49:04 Done.
21 set $user_agent "firefox"; 21 set $user_agent "firefox";
22 } 22 }
23 if ($http_user_agent ~ \bChrome/\d+) { 23 if ($http_user_agent ~ \bChrome/\d+) {
24 set $user_agent "chrome"; 24 set $user_agent "chrome";
25 } 25 }
26 if ($http_user_agent ~ \bPresto/\d+) { 26 if ($http_user_agent ~ \bPresto/\d+) {
27 set $user_agent "opera"; 27 set $user_agent "opera";
28 } 28 }
29 if ($http_user_agent ~ \bAndroid\s.*\bAppleWebKit/\d+) { 29 if ($http_user_agent ~ \bAndroid\s.*\bAppleWebKit/\d+) {
30 set $user_agent "android"; 30 set $user_agent "android";
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 fastcgi_param GATEWAY_INTERFACE CGI/1.1; 116 fastcgi_param GATEWAY_INTERFACE CGI/1.1;
117 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 117 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
118 118
119 fastcgi_param REMOTE_ADDR $remote_addr; 119 fastcgi_param REMOTE_ADDR $remote_addr;
120 fastcgi_param REMOTE_PORT $remote_port; 120 fastcgi_param REMOTE_PORT $remote_port;
121 fastcgi_param SERVER_ADDR $server_addr; 121 fastcgi_param SERVER_ADDR $server_addr;
122 fastcgi_param SERVER_PORT $server_port; 122 fastcgi_param SERVER_PORT $server_port;
123 fastcgi_param SERVER_NAME $server_name; 123 fastcgi_param SERVER_NAME $server_name;
124 } 124 }
125 } 125 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld