app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def authorized!
      origin_url_arr = request.original_url.split "?"
      origin_url = origin_url_arr[0]
      logger.info "origin_url: #{origin_url}"
      unless access_token_value.nil? 
        logger.info "access_token_value: #{access_token_value}"  
        code = pms_right_v2 origin_url, access_token_value
        logger.info "rights v2 code: #{code}"
        unless code == "200" or code == "4040"
          not_allowed 
        end
      end
    end
def authorized! origin_url_arr = request . original_url . split "?" origin_url = origin_url_arr [ 0 ] logger . info "origin_url: #{origin_url}" unless access_token_value . nil? logger . info "access_token_value: #{access_token_value}" code = pms_right_v2 origin_url , access_token_value logger . info "rights v2 code: #{code}" unless code == "200" or code == "4040" not_allowed end end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .