protect all API routes with basic auth #4

Merged
bilal.catic merged 4 commits from add-basic-auth into master 2020-09-04 05:19:51 +02:00
Showing only changes of commit aaa857a6e7 - Show all commits

View File

@@ -1,3 +1,7 @@
class ApplicationController < ActionController::API
include Response
include ActionController::HttpAuthentication::Basic::ControllerMethods
http_basic_authenticate_with name: ENV['BASIC_AUTH_USERNAME'],
password: ENV['BASIC_AUTH_PASSWORD']
end