Improve http_service.checks documentation #1862
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
For the
method
andprotocol
options, indicate that the default values (if omitted) areget
andhttp
, respectively.Additionally, add a warning section that warns about common issues with redirects (or any non-200 response).
One such example is that, by default, a standard Rails application includes
config.force_ssl = true
inconfig/environments/production.rb
, which causes a health check request to http://0.0.0.0:3000/up to receive a 301 redirect to https://0.0.0.0:3000/up (and the default puma config for Rails is not configured to accept SSL requests).The warning includes some guidance about adding an
X-Forwarded-Proto = "https"
header to the health check to avoid this sort of redirect.Related Fly.io community and GitHub links
https://community.fly.io/t/http-service-checks-random-questions/22424