|
|
|
@ -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
|
|
|
|
|
|
|
|
|
|