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

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

Issue 29373591: Issue 2734 - Configure new redirects from adblocklus.org (Closed)
Patch Set: Created Jan. 24, 2017, 3:27 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)?$|^/blog/) 4 if ($uri ~ ^/(:?\w\w(_\w\w)?/)?(?:index|firefox|chrome|opera|android|internet-ex plorer|safari|yandex-browser|maxthon)?$|^/blog/)
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 rewrite ^ /forum/viewforum.php?f=26? redirect; 173 rewrite ^ /forum/viewforum.php?f=26? redirect;
174 } 174 }
175 if ($arg_link = "adblock_plus_safari_ios_store") 175 if ($arg_link = "adblock_plus_safari_ios_store")
176 { 176 {
177 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire ct; 177 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire ct;
178 } 178 }
179 if ($arg_link = "adblock_plus_sbrowser_store") 179 if ($arg_link = "adblock_plus_sbrowser_store")
180 { 180 {
181 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adbl ockplussbrowser? redirect; 181 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adbl ockplussbrowser? redirect;
182 } 182 }
183 if ($arg_link = "releases")
184 {
185 rewrite ^ https://adblockplus.org/releases? redirect;
f.nicolaisen 2017/01/24 15:35:14 It would be consistent with most of the previous e
186 }
187 if ($arg_link = "social_facebook")
188 {
189 rewrite ^ https://www.facebook.com/adblockplus? redirect;
190 }
191 if ($arg_link = "social_gplus")
192 {
193 rewrite ^ https://www.google.com/+AdblockPlus? redirect;
194 }
195 if ($arg_link = "social_renren")
196 {
197 rewrite ^ http://www.renren.com/601651969? redirect;
198 }
199 if ($arg_link = "social_twitter")
200 {
201 rewrite ^ https://twitter.com/adblockplus? redirect;
202 }
203 if ($arg_link = "social_weibo")
204 {
205 rewrite ^ http://e.weibo.com/adblockplus/? redirect;
206 }
183 207
184 set $link ""; 208 set $link "";
185 set $anchor ""; 209 set $anchor "";
186 210
187 if ($arg_link ~ "^share-") 211 if ($arg_link ~ "^share-")
188 { 212 {
189 set $link "share"; 213 set $link "share";
190 set $anchor "?a=minimal"; 214 set $anchor "?a=minimal";
191 } 215 }
192 if ($arg_link = "uninstalled") 216 if ($arg_link = "uninstalled")
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 location /403.html 345 location /403.html
322 { 346 {
323 try_files $uri @proxied; 347 try_files $uri @proxied;
324 } 348 }
325 location @proxied 349 location @proxied
326 { 350 {
327 proxy_pass https://server16.adblockplus.org; 351 proxy_pass https://server16.adblockplus.org;
328 proxy_set_header Host adblockplus.org; 352 proxy_set_header Host adblockplus.org;
329 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 353 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
330 } 354 }
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