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

Side by Side Diff: modules/web/templates/adblockplus.org.conf.erb

Issue 29328965: Issue 2874 - Redirect Microsoft Edge users to coming soon landing page (Closed)
Patch Set: Created Oct. 8, 2015, 12:19 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # XSS and clickjacking prevention headers 1 # XSS and clickjacking prevention headers
2 2
3 set $csp_frame ""; 3 set $csp_frame "";
4 if ($uri ~ ^/(:?\w\w(_\w\w)?/)?(?:index|firefox|chrome|opera|android|internet-ex plorer|safari|yandex-browser|maxthon)?$) 4 if ($uri ~ ^/(:?\w\w(_\w\w)?/)?(?:index|firefox|chrome|opera|android|internet-ex plorer|safari|yandex-browser|maxthon)?$)
5 { 5 {
6 set $csp_frame "; frame-src www.youtube-nocookie.com;"; 6 set $csp_frame "; frame-src www.youtube-nocookie.com;";
7 } 7 }
8 add_header Content-Security-Policy "default-src 'self'; img-src * data:; style-s rc 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' $csp_ frame"; 8 add_header Content-Security-Policy "default-src 'self'; img-src * data:; style-s rc 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' $csp_ frame";
9 add_header X-Frame-Options "sameorigin"; 9 add_header X-Frame-Options "sameorigin";
10 10
(...skipping 15 matching lines...) Expand all
26 set $user_agent "chrome"; 26 set $user_agent "chrome";
27 } 27 }
28 if ($http_user_agent ~ \bMSIE\ \d+) 28 if ($http_user_agent ~ \bMSIE\ \d+)
29 { 29 {
30 set $user_agent "internet-explorer"; 30 set $user_agent "internet-explorer";
31 } 31 }
32 if ($http_user_agent ~ \bTrident/\d+) 32 if ($http_user_agent ~ \bTrident/\d+)
33 { 33 {
34 set $user_agent "internet-explorer"; 34 set $user_agent "internet-explorer";
35 } 35 }
36 if ($http_user_agent ~ \bEdge/\d+)
37 {
38 set $user_agent "internet-explorer";
39 }
40 if ($http_user_agent ~ \bPresto/\d+) 36 if ($http_user_agent ~ \bPresto/\d+)
41 { 37 {
42 set $user_agent "opera"; 38 set $user_agent "opera";
43 } 39 }
44 if ($http_user_agent ~ \bOPR/\d+) 40 if ($http_user_agent ~ \bOPR/\d+)
45 { 41 {
46 set $user_agent "opera"; 42 set $user_agent "opera";
47 } 43 }
48 if ($http_user_agent ~ \bAndroid\s.*\bAppleWebKit/\d+) 44 if ($http_user_agent ~ \bAndroid\s.*\bAppleWebKit/\d+)
49 { 45 {
50 set $user_agent "android"; 46 set $user_agent "android";
51 } 47 }
48 if ($http_user_agent ~ \bEdge/\d+)
49 {
50 set $user_agent "edge";
51 }
52 if ($http_user_agent ~ \bYaBrowser/\d+) 52 if ($http_user_agent ~ \bYaBrowser/\d+)
53 { 53 {
54 set $user_agent "yandex-browser"; 54 set $user_agent "yandex-browser";
55 } 55 }
56 if ($http_user_agent ~ \bMaxthon/\d+) 56 if ($http_user_agent ~ \bMaxthon/\d+)
57 { 57 {
58 set $user_agent "maxthon"; 58 set $user_agent "maxthon";
59 } 59 }
60 if ($http_user_agent ~ \b(iPad|iPhone|iPod)\b) 60 if ($http_user_agent ~ \b(iPad|iPhone|iPod)\b)
61 { 61 {
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 location /403.html 279 location /403.html
280 { 280 {
281 try_files $uri @proxied; 281 try_files $uri @proxied;
282 } 282 }
283 location @proxied 283 location @proxied
284 { 284 {
285 proxy_pass https://server16.adblockplus.org; 285 proxy_pass https://server16.adblockplus.org;
286 proxy_set_header Host adblockplus.org; 286 proxy_set_header Host adblockplus.org;
287 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 287 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
288 } 288 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld