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

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

Issue 29332588: Issue 3403 - Add web redirect for the uninstallation page (Closed)
Patch Set: Created Dec. 13, 2015, 5:22 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 set $lang "en"; 165 set $lang "en";
166 set $link ""; 166 set $link "";
167 set $anchor ""; 167 set $anchor "";
168 168
169 if ($arg_link ~ "^share-") 169 if ($arg_link ~ "^share-")
170 { 170 {
171 set $link "share"; 171 set $link "share";
172 set $anchor "?a=minimal"; 172 set $anchor "?a=minimal";
173 } 173 }
174 if ($arg_link ~ "uninstalled")
Felix Dahlke 2015/12/14 10:23:26 Since you're not matching a regex, you can just us
kzar 2015/12/14 10:45:49 Done.
175 {
176 set $link "uninstall-abp";
177 }
174 if ($arg_link = "gettingStarted") 178 if ($arg_link = "gettingStarted")
175 { 179 {
176 set $link "getting_started"; 180 set $link "getting_started";
177 } 181 }
178 if ($arg_link = "faq") 182 if ($arg_link = "faq")
179 { 183 {
180 set $link "faq"; 184 set $link "faq";
181 } 185 }
182 if ($arg_link = "filterdoc") 186 if ($arg_link = "filterdoc")
183 { 187 {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 set $lang "$1_$2"; 237 set $lang "$1_$2";
234 } 238 }
235 if (!-f "$document_root/$lang/$link") 239 if (!-f "$document_root/$lang/$link")
236 { 240 {
237 set $lang "en"; 241 set $lang "en";
238 } 242 }
239 if ($link = "share") 243 if ($link = "share")
240 { 244 {
241 rewrite ^ https://share.adblockplus.org/$lang/? redirect; 245 rewrite ^ https://share.adblockplus.org/$lang/? redirect;
242 } 246 }
247 if ($link = "uninstall-abp")
248 {
249 rewrite ^ /$lang/$link$anchor redirect;
kzar 2015/12/13 17:25:40 This is required because we want to preserve query
Felix Dahlke 2015/12/14 10:23:26 So you mean, this: https://adblockplus.org/redire
kzar 2015/12/14 10:45:49 Yep, although we've just agreed in IRC to rename u
Felix Dahlke 2015/12/14 11:21:16 Awesome, I was about to suggest that, but didn't b
250 }
243 rewrite ^ /$lang/$link$anchor? redirect; 251 rewrite ^ /$lang/$link$anchor? redirect;
244 } 252 }
245 253
246 location /devbuilds 254 location /devbuilds
247 { 255 {
248 rewrite ^(.*) https://downloads.adblockplus.org$1; 256 rewrite ^(.*) https://downloads.adblockplus.org$1;
249 } 257 }
250 258
251 # Locations still served by the legacy server 259 # Locations still served by the legacy server
252 260
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 location /403.html 305 location /403.html
298 { 306 {
299 try_files $uri @proxied; 307 try_files $uri @proxied;
300 } 308 }
301 location @proxied 309 location @proxied
302 { 310 {
303 proxy_pass https://server16.adblockplus.org; 311 proxy_pass https://server16.adblockplus.org;
304 proxy_set_header Host adblockplus.org; 312 proxy_set_header Host adblockplus.org;
305 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 313 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
306 } 314 }
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