Closed nreilly closed 1 year ago
The linked pull request resolves the issue
NAME | STATUS | MACHINE | LAST UPDATED | OUTPUT
---------*---------*----------------*--------------*-------------------------------------------------------------
status | passing | 3287314b032685 | just now | <html><body style="background-color: green"></body></html>
---------*---------*----------------*--------------*-------------------------------------------------------------
Using flyctl v0.0.0-1687908539+dev darwin/amd64 Commit: 313f950616cdab01d9ba4adf46d363a4d4137613 BuildDate: 2023-06-27T23:28:59Z BranchName: rails-health-https
Extract from fly.toml:
[checks]
[checks.status]
port = 3000
type = "http"
interval = "10s"
timeout = "2s"
grace_period = "5s"
method = "GET"
path = "/up"
protocol = "http"
[checks.status.headers]
X-Forwarded-Proto = "https"
The bug Fly launch creates health checks for the new Rails 7.1 discoverable health checks as shown here. However, the checks generated will fail as the default Rails configuration forces https.
I've tested with both the homebrew flavour of flyctl, and a fresh build.
By adding
X-Forwarded-Proto = "https"
to the generated check in thefly.toml
, we can get it to pass.14.0 Beta (23A5276g)
fly v0.1.40 darwin/amd64 Commit: e66f5f35e30a886c4572639197c28db58046effa-dirty BuildDate: 2023-06-21T17:47:00Z
flyctl v0.0.0-1687485852+dev darwin/amd64 Commit: 620a4fc1eea7737eae58e607444aad448655b8bc BuildDate: 2023-06-23T02:04:12Z BranchName: master
Rails 7.1.0.alpha
Generated
fly.toml
Status Check:
Adjusted
fly.toml
Resulting Status Check: