Add Health Check endpoint

This commit is contained in:
Karol Sójko
2020-06-17 06:59:27 +02:00
parent 5fa8798010
commit 0a58c31f11
3 changed files with 8 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class HealthCheckController < ApplicationController
def index
render :plain => "OK"
end
end

View File

@@ -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

View File

@@ -1,3 +1,5 @@
Rails.application.routes.draw do
get "/healthcheck" => "health_check#index"
root 'application#app'
end