app/controllers/api/v1/simple_admin/base_controller.rb in simple-admin-1.0.0 vs app/controllers/api/v1/simple_admin/base_controller.rb in simple-admin-1.0.1

- old
+ new

@@ -1,6 +1,13 @@ module Api::V1 module SimpleAdmin class BaseController < ActionController::API + before_action :verify_key_is_valid! + + private + + def verify_key_is_valid! + return head(:forbidden) unless request.headers['SimpleAdmin-Secret-Key'] == ENV['SIMPLE_ADMIN_SECRET_KEY'] + end end end end