refactoring

This commit is contained in:
Oleg Hasjanov 2021-08-27 11:09:49 +03:00 committed by olegphenomenon
parent a87fd6a8b7
commit ece988fca1
6 changed files with 95 additions and 53 deletions

View file

@ -17,7 +17,7 @@ module Api
private
def check_ip_whitelist
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?