mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 04:07:33 +02:00
change key token
This commit is contained in:
parent
62ce5ff561
commit
11b7a13cf3
4 changed files with 7 additions and 14 deletions
|
@ -4,8 +4,6 @@ module Api
|
|||
module V1
|
||||
module AccreditationCenter
|
||||
class BaseController < ActionController::API
|
||||
# before_action :check_ip_whitelist
|
||||
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :show_not_found_error
|
||||
rescue_from ActiveRecord::RecordInvalid, with: :show_invalid_record_error
|
||||
rescue_from(ActionController::ParameterMissing) do |parameter_missing_exception|
|
||||
|
@ -17,13 +15,6 @@ module Api
|
|||
|
||||
private
|
||||
|
||||
# def check_ip_whitelist
|
||||
# allowed_ips = ENV['accr_center_api_auth_allowed_ips'].to_s.split(',').map(&:strip)
|
||||
# return if allowed_ips.include?(request.ip) || Rails.env.development? || Rails.env.staging?
|
||||
|
||||
# render json: { errors: [{ base: ['Not authorized'] }] }, status: :unauthorized
|
||||
# end
|
||||
|
||||
def show_not_found_error
|
||||
render json: { errors: [{ base: ['Not found'] }] }, status: :not_found
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue