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

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

Issue 29326065: Issue 2958 - Add Adblock Browser support, store and download redirects (Closed)
Patch Set: Created Sept. 8, 2015, 6:37 a.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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 rewrite ^ /forum/viewtopic.php?t=23597? redirect; 114 rewrite ^ /forum/viewtopic.php?t=23597? redirect;
115 } 115 }
116 if ($arg_link = "adblock_browser_android_beta_community") 116 if ($arg_link = "adblock_browser_android_beta_community")
117 { 117 {
118 rewrite ^ https://plus.google.com/communities/104936844759781288661? redirec t; 118 rewrite ^ https://plus.google.com/communities/104936844759781288661? redirec t;
119 } 119 }
120 if ($arg_link ~ "^adblock_browser_promotion_\d$") 120 if ($arg_link ~ "^adblock_browser_promotion_\d$")
121 { 121 {
122 rewrite ^ https://adblockplus.org/adblock-browser redirect; 122 rewrite ^ https://adblockplus.org/adblock-browser redirect;
123 } 123 }
124 if ($arg_link = "adblock_browser_android_support")
125 {
126 rewrite ^ https://adblockbrowser.org/en/android-support/? redirect;
127 }
128 if ($arg_link = "adblock_browser_ios_support")
129 {
130 rewrite ^ https://adblockbrowser.org/en/ios-support/? redirect;
131 }
132 if ($arg_link = "adblock_browser_android_store")
133 {
134 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.brow ser? redirect;
135 }
136 if ($arg_link = "adblock_browser_ios_store")
137 {
138 rewrite ^ https://itunes.apple.com/us/app/adblock-browser/id1015653330?ls=1& mt=8? redirect;
139 }
140 if ($arg_link = "adblock_browser_android_download")
141 {
142 rewrite ^ https://downloads.adblockplus.org/adblockbrowser-1.0.0-arm.apk? re direct;
143 }
124 144
125 set $lang "en"; 145 set $lang "en";
126 set $link ""; 146 set $link "";
127 set $anchor ""; 147 set $anchor "";
128 148
129 if ($arg_link ~ "^share-") 149 if ($arg_link ~ "^share-")
130 { 150 {
131 set $link "share"; 151 set $link "share";
132 set $anchor "?a=minimal"; 152 set $anchor "?a=minimal";
133 } 153 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 location /403.html 269 location /403.html
250 { 270 {
251 try_files $uri @proxied; 271 try_files $uri @proxied;
252 } 272 }
253 location @proxied 273 location @proxied
254 { 274 {
255 proxy_pass https://server16.adblockplus.org; 275 proxy_pass https://server16.adblockplus.org;
256 proxy_set_header Host adblockplus.org; 276 proxy_set_header Host adblockplus.org;
257 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 277 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
258 } 278 }
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