使用 Authlogic 创建会话时,是否可以将 cookie 域设置为当前域以外的其他域?
从我们的注册域创建新帐户时,我想将用户重定向到他们的子域帐户并登录用户。
电流控制器:
def create
@account = Account.new(params[:account])
if @account.save
@user_session = @account.user_sessions.create(@account.users.first)
# I'd like the cookie domain to be [@account.subdomain, APP_CONFIG[:domain]].join(".")
redirect_to admin_root_url(:host => [@account.subdomain, APP_CONFIG[:domain]].join("."))
else
render 'new'
end
end