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: Renamed uninstall-abp uninstalled, added comment Created Dec. 14, 2015, 10:43 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 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")
175 {
176 set $link "uninstalled";
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 = "uninstalled")
248 {
249 # For the uninstallation page we need to preserve the query parameters
Sebastian Noack 2015/12/14 12:38:37 We probably should strip the "link" parameter. Any
kzar 2015/12/14 12:44:11 Sure it's redundant but it doesn't harm. I couldn'
Felix Dahlke 2015/12/14 12:49:10 I thought about this as well, but AFAIK there's no
kzar 2015/12/14 12:59:12 My vote is to leave it as-is, it's simple and it w
Sebastian Noack 2015/12/14 13:17:25 Well, this certainly isn't something that would de
250 rewrite ^ /$lang/$link redirect;
251 }
243 rewrite ^ /$lang/$link$anchor? redirect; 252 rewrite ^ /$lang/$link$anchor? redirect;
244 } 253 }
245 254
246 location /devbuilds 255 location /devbuilds
247 { 256 {
248 rewrite ^(.*) https://downloads.adblockplus.org$1; 257 rewrite ^(.*) https://downloads.adblockplus.org$1;
249 } 258 }
250 259
251 # Locations still served by the legacy server 260 # Locations still served by the legacy server
252 261
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 location /403.html 306 location /403.html
298 { 307 {
299 try_files $uri @proxied; 308 try_files $uri @proxied;
300 } 309 }
301 location @proxied 310 location @proxied
302 { 311 {
303 proxy_pass https://server16.adblockplus.org; 312 proxy_pass https://server16.adblockplus.org;
304 proxy_set_header Host adblockplus.org; 313 proxy_set_header Host adblockplus.org;
305 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 314 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
306 } 315 }
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