serve frontend from rails through protected route

This commit is contained in:
Bilal
2020-05-21 18:14:15 +02:00
parent aaa857a6e7
commit 5dbd2ec95d
5 changed files with 22 additions and 1 deletions

View File

@@ -1,7 +1,12 @@
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
end