Integrate auction

Closes #874
This commit is contained in:
Artur Beljajev 2018-11-29 15:08:22 +02:00
parent 640faaadb9
commit 42e8f86dae
51 changed files with 1619 additions and 53 deletions

View file

@ -0,0 +1,18 @@
require 'rails5_api_controller_backport'
module Api
module V1
class BaseController < ActionController::API
private
def authenticate
ip_allowed = allowed_ips.include?(request.remote_ip)
head :unauthorized unless ip_allowed
end
def allowed_ips
ENV['auction_api_allowed_ips'].split(',').map(&:strip)
end
end
end
end