From 13fc571cdd72d7b1f681b4493726de5deb53b0cb Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 12 Oct 2021 17:35:54 +0100 Subject: [PATCH] Stick the endpoint behind basic auth --- app/controllers/case_logs_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/case_logs_controller.rb b/app/controllers/case_logs_controller.rb index 36c32d286..98af41d26 100644 --- a/app/controllers/case_logs_controller.rb +++ b/app/controllers/case_logs_controller.rb @@ -1,5 +1,6 @@ class CaseLogsController < ApplicationController skip_before_action :verify_authenticity_token, only: [:create], if: :json_request? + http_basic_authenticate_with name: ENV["API_USER"], password: ENV["API_KEY"], only: [:create], if: :json_request? def index @submitted_case_logs = CaseLog.where(status: 1)