handle requests for frontend files through secured route

This commit is contained in:
Bilal
2020-05-21 19:48:20 +02:00
parent 5dbd2ec95d
commit 47fc120cdc
4 changed files with 29 additions and 15 deletions

View File

@@ -1,12 +1,4 @@
class ApplicationController < ActionController::API
include Response
include ActionView::Layouts
include ActionController::HttpAuthentication::Basic::ControllerMethods
http_basic_authenticate_with name: ENV['BASIC_AUTH_USERNAME'],
password: ENV['BASIC_AUTH_PASSWORD']
def frontend_index_html
render file: 'protected_public/index.html'
end
include BasicAuth
end