From 9f9e147a73f52af11857d3388c7b5f29c9ea31f7 Mon Sep 17 00:00:00 2001 From: magnolia-fan Date: Thu, 23 Jun 2011 09:39:31 +0400 Subject: [PATCH] Lastfm multi-domain login --- app/controllers/last_fm_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/last_fm_controller.rb b/app/controllers/last_fm_controller.rb index f6c4091..a9accb0 100644 --- a/app/controllers/last_fm_controller.rb +++ b/app/controllers/last_fm_controller.rb @@ -37,7 +37,8 @@ class LastFmController < ApplicationController else render :json => { :connected => false, - :lastfm_login_url => 'http://www.last.fm/api/auth?api_key='+ @@api_key +'&cb=http://localhost/lastfm/connect/?sid='+ user.session.key + :lastfm_login_url => 'http://www.last.fm/api/auth?api_key='+ @@api_key + + '&cb=http://'+ request.host << '/lastfm/connect/?sid='+ user.session.key } end end