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