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

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

Issue 29548672: Issue 5709 - Added new redirects for new options page (Closed)
Patch Set: Created Sept. 18, 2017, 2:56 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 rewrite ^ /forum/viewforum.php?f=26? redirect; 177 rewrite ^ /forum/viewforum.php?f=26? redirect;
178 } 178 }
179 if ($arg_link = "adblock_plus_safari_ios_store") 179 if ($arg_link = "adblock_plus_safari_ios_store")
180 { 180 {
181 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire ct; 181 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire ct;
182 } 182 }
183 if ($arg_link = "adblock_plus_sbrowser_store") 183 if ($arg_link = "adblock_plus_sbrowser_store")
184 { 184 {
185 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adbl ockplussbrowser? redirect; 185 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adbl ockplussbrowser? redirect;
186 } 186 }
187 if ($arg_link = "adblock_plus_chrome_dnt")
188 {
189 rewrite ^ https://support.google.com/chrome/answer/2790761? redirect;
190 }
191 if ($arg_link = "adblock_plus_firefox_dnt")
192 {
193 rewrite ^ https://www.mozilla.org/en-US/firefox/dnt/? redirect;
194 }
195 if ($arg_link = "adblock_plus_opera_dnt")
196 {
197 rewrite ^ http://help.opera.com/Windows/12.10/en/notrack.html? redirect;
198 }
199 if ($arg_link = "adblock_plus_edge_dnt")
200 {
201 rewrite ^ https://privacy.microsoft.com/en-us/windows-10-microsoft-edge-and- privacy? redirect;
202 }
203 if ($arg_link = "adblock_plus_report_bug")
204 {
205 rewrite ^ https://adblockplus.org/bugs#reporting? redirect;
206 }
207 if ($arg_link = "adblock_plus_report_ad")
208 {
209 rewrite ^ https://forums.lanik.us/viewforum.php?f=62? redirect;
210 }
211
212 set $forum_id "64";
213 set $forum_link "";
214 if ($arg_link = "adblock_plus_report_issue")
215 {
216 set $forum_link "https://forums.lanik.us/viewforum.php?f=";
217 }
218 if ($lang = "id")
219 {
220 set $forum_id "94";
221 }
222 if ($lang = "nl")
223 {
224 set $forum_id "100";
225 }
226 if ($lang = "de")
227 {
228 set $forum_id "90";
229 }
230 if ($lang = "it")
231 {
232 set $forum_id "96";
233 }
234 if ($lang = "es")
235 {
236 set $forum_id "103";
237 }
238 if ($lang = "lt")
239 {
240 set $forum_id "101";
241 }
242 if ($lang = "lv")
243 {
244 set $forum_id "99";
245 }
246 if ($lang = "ar")
247 {
248 set $forum_id "98";
249 }
250 if ($lang = "fr")
251 {
252 set $forum_id "91";
253 }
254 if ($lang = "ru")
255 {
256 set $forum_id "102";
257 }
258 if ($forum_link != "")
259 {
260 rewrite ^ $forum_link$forum_id? redirect;
261 }
187 if ($arg_link = "releases") 262 if ($arg_link = "releases")
188 { 263 {
189 rewrite ^ /releases? redirect; 264 rewrite ^ /releases? redirect;
190 } 265 }
191 if ($arg_link = "social_facebook") 266 if ($arg_link = "social_facebook")
192 { 267 {
193 rewrite ^ https://www.facebook.com/adblockplus? redirect; 268 rewrite ^ https://www.facebook.com/adblockplus? redirect;
194 } 269 }
195 if ($arg_link = "social_gplus") 270 if ($arg_link = "social_gplus")
196 { 271 {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 335 }
261 if ($arg_link = "acceptable_ads_criteria") 336 if ($arg_link = "acceptable_ads_criteria")
262 { 337 {
263 set $link "acceptable-ads"; 338 set $link "acceptable-ads";
264 set $anchor "#criteria"; 339 set $anchor "#criteria";
265 } 340 }
266 if ($arg_link = "contributors") 341 if ($arg_link = "contributors")
267 { 342 {
268 set $link "contributors"; 343 set $link "contributors";
269 } 344 }
345 if ($arg_link = "whitelist")
346 {
347 set $link "faq_basics";
348 set $anchor "#disable";
349 }
270 350
271 if ($link = "") 351 if ($link = "")
272 { 352 {
273 return 404; 353 return 404;
274 } 354 }
275 355
276 if (!-f "$document_root/$lang/$link") 356 if (!-f "$document_root/$lang/$link")
277 { 357 {
278 set $lang "!!"; 358 set $lang "!!";
279 } 359 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 location /403.html 425 location /403.html
346 { 426 {
347 try_files $uri @proxied; 427 try_files $uri @proxied;
348 } 428 }
349 location @proxied 429 location @proxied
350 { 430 {
351 proxy_pass https://server16.adblockplus.org; 431 proxy_pass https://server16.adblockplus.org;
352 proxy_set_header Host adblockplus.org; 432 proxy_set_header Host adblockplus.org;
353 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 433 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
354 } 434 }
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