diff --git a/app/api/mobile/api.rb b/app/api/mobile/api.rb index 5897124e..95552667 100644 --- a/app/api/mobile/api.rb +++ b/app/api/mobile/api.rb @@ -34,7 +34,7 @@ module Mobile version 'v1', using: :path format :json content_type :json, "application/json;charset=UTF-8" - #use ActionDispatch::Session::CookieStore + use ActionDispatch::Session::CacheStore :expire_after => 8.hours, :key => '_educoder_session', :domain => :all require 'digest' use Mobile::Middleware::ErrorHandler @@ -139,7 +139,9 @@ module Mobile # Rails.logger.info("########### host is #{request.host}") - if (Rails.env.development? && session[:user_id].blank?) || (session[:user_id].blank? && request.host.include?("testbdweb")) || params[:action] == "privateGit" + if (Rails.env.development? && session[:user_id].blank?) || + (session[:user_id].blank? && request.host.include?("testbdweb")) || + params[:action] == "privateGit" session[:user_id] = 12 #116 end