Add Health Check endpoint
This commit is contained in:
5
app/controllers/health_check_controller.rb
Normal file
5
app/controllers/health_check_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class HealthCheckController < ApplicationController
|
||||
def index
|
||||
render :plain => "OK"
|
||||
end
|
||||
end
|
||||
@@ -2,6 +2,7 @@ Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
config.force_ssl = true
|
||||
config.ssl_options = { redirect: { exclude: -> request { request.path =~ /healthcheck/ } } }
|
||||
|
||||
# Code is not reloaded between requests.
|
||||
config.cache_classes = true
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
Rails.application.routes.draw do
|
||||
get "/healthcheck" => "health_check#index"
|
||||
|
||||
root 'application#app'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user