Mercurial > hg > soundsoftware-site
comparison app/controllers/application_controller.rb @ 475:32dd9e02950a cannam
Merge
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Mon, 27 Jun 2011 12:38:02 +0100 |
parents | 350acce374a2 dff13616e464 |
children | 851510f1b535 |
comparison
equal
deleted
inserted
replaced
443:350acce374a2 | 475:32dd9e02950a |
---|---|
268 # do not redirect user to another host or to the login or register page | 268 # do not redirect user to another host or to the login or register page |
269 if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) | 269 if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) |
270 # soundsoftware: if back_url is the home page, | 270 # soundsoftware: if back_url is the home page, |
271 # change it to My Page (#125) | 271 # change it to My Page (#125) |
272 if (uri.path == home_path) | 272 if (uri.path == home_path) |
273 uri.path = uri.path + "/my" | 273 if (uri.path =~ /\/$/) |
274 uri.path = uri.path + "my" | |
275 else | |
276 uri.path = uri.path + "/my" | |
277 end | |
274 end | 278 end |
275 # soundsoftware: if login page is https but back_url http, | 279 # soundsoftware: if login page is https but back_url http, |
276 # switch back_url to https to ensure cookie validity (#83) | 280 # switch back_url to https to ensure cookie validity (#83) |
277 if (uri.scheme == "http") && (URI.parse(request.url).scheme == "https") | 281 if (uri.scheme == "http") && (URI.parse(request.url).scheme == "https") |
278 uri.scheme = "https" | 282 uri.scheme = "https" |