Skip to content

Commit 3bbf155

Browse files
committed
add docs
1 parent 6dd9dfd commit 3bbf155

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,32 @@ Thruster's environment variables can optionally be prefixed with `THRUSTER_`.
108108
For example, `TLS_DOMAIN` can also be written as `THRUSTER_TLS_DOMAIN`. Whenever
109109
a prefixed variable is set, it will take precedence over the unprefixed version.
110110

111+
### HTTP_HEALTH_PATH and rails
112+
113+
When using `HTTP_HEALTH_PATH` for health check, this endpoint should work over HTTP protocol and return 200 status code. In rails you can add in `config/routes.rb` such route:
114+
115+
```ruby
116+
get '/health', to: 'rails/health#show', as: :rails_health_check
117+
```
118+
119+
and add in `config/application.rb` such settings for hosts checks:
120+
121+
```ruby
122+
config.host_authorization = {
123+
exclude: ->(request) { request.path == '/health' }
124+
}
125+
```
126+
127+
If your environment have `config.assume_ssl = true` (not handle http to https redirects), in this case you done. But if you doing http to https redirects on rails side (like need on heroku router), you need also add in `config/application.rb` such settings:
128+
129+
```ruby
130+
config.ssl_options = {
131+
redirect: {
132+
exclude: ->(request) { request.path == '/health' }
133+
}
134+
}
135+
```
136+
111137
## Security
112138

113139
### BREACH Mitigation

0 commit comments

Comments
 (0)