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