health_monitor_lb 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10859ba4ff5c605345ae3a5980c47a573a058fe5b890574a0fcc702b6318cbb1
4
- data.tar.gz: 286432d349f9e20743264685a4f3a97ee5852c6239f01bfab043129019fcb166
3
+ metadata.gz: '0008cd590689ec08663474c8191020007bbbba1246ea4a976c21eae58ab393df'
4
+ data.tar.gz: c88511fd785bda3ca643f1edb5f06faaf6e41088db935d29fffe85757854943c
5
5
  SHA512:
6
- metadata.gz: c38c71932fbc6115176d05bec121fc1ab3b0437daa7b06160799a00711b6604b5c5ef92e44b065267a68279bfa57ef78d0eb76960bf233a2721e23eae7260e9c
7
- data.tar.gz: f6532a9558d78a8c715020bc42445f05c879d66b668969d32921e6d64585dd78683002e560fe5c82252e24ad9f9d0ccf0264a780603bc4582b48f0514125605c
6
+ metadata.gz: ce5528044b4d8d8cd8125ea550ecad3e74b9d6fb9a0cd72a186b7d73e04e82bcf6a51c6c2ce0d86fad4cc7e47825c506b5a37d469be584d37f5a8a4341ccdb91
7
+ data.tar.gz: d4cdffd84fe43b064d04135b6f1b61232205f08f021b73e5dd00099eff81f2a4c5c0846519d2e227a47f944009a173bf49ffc5b93425ea3a674b0986342076fb
@@ -1,5 +1,7 @@
1
1
  module HealthMonitorLb
2
2
  class HealthController < ApplicationController
3
+ before_action :disable_ssl, only: :disable_ssl_actions
4
+
3
5
  def index
4
6
  status = HealthCheckService.new.call
5
7
 
@@ -9,5 +11,17 @@ module HealthMonitorLb
9
11
 
10
12
  render json: status, status: :ok
11
13
  end
14
+
15
+ def disable_ssl
16
+ # This is a workaround for the issue with SSL termination in AWS ELB
17
+ # where the health check URL is not accessible over HTTP.
18
+ redirect_to request.url.gsub(/https/i, 'http') if request.ssl?
19
+ end
20
+
21
+ def disable_ssl_actions
22
+ actions = []
23
+ actions << :index unless ENV['ENABLE_HEALTH_CHECK_SSL']
24
+ actions
25
+ end
12
26
  end
13
27
  end
@@ -1,3 +1,3 @@
1
1
  module HealthMonitorLb
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health_monitor_lb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan Hecht
@@ -9,7 +9,7 @@ authors:
9
9
  - Kevin Foster
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-03-31 00:00:00.000000000 Z
12
+ date: 2025-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails