health check: malformed request [http vs https] #1204
Replies: 4 comments
-
My hunch is the issue with following SSL config you have in production.rb, try removing and see if it helps.
The healthcheck is at |
Beta Was this translation helpful? Give feedback.
-
I had this issue and I struggled for hours to get past it. Here are all of the things that I needed to do, I don't know if they are all necessary but I wound up getting things to work: Upgrade to Rails 8I updated the gem in my Gemfile, and I ran # Assume all access to the app is happening through a SSL-terminating reverse proxy.
config.assume_ssl = true
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
# Skip http-to-https redirect for the default health check endpoint.
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } Install Thruster and update the Dockerfile
EXPOSE 80
CMD ["./bin/thrust", "./bin/rails", "server"] Go back to defaults in
|
Beta Was this translation helpful? Give feedback.
-
I ended up with this config in my production.rb
What i also did was remove all images and containers from the server before deploying again. After that it worked for me. Don't know what did the trick ¯_(ツ)_/¯ |
Beta Was this translation helpful? Give feedback.
-
The issue I encountered is that I am deploying an accessory with a third-party image, so I cannot modify the source code. Since user authentication is enabled, the HTTP status returned is not 200, which causes the health check to fail. |
Beta Was this translation helpful? Give feedback.
-
Hi all
I'm trying to deploy a RoR app to a digitalocean droplet. The healthcheck seems to fail because it is doing so with an https connection while it expects http. The rails app is quite new with little config. Deploying to server was my first step after creating a quick landingpage. Hopefully someone can point me in the right direction.
Addition to production.rb on recommendation of claude. (although kamal 2.0 is too new for claude to be much help)
deploy.yml
error message from kamal:
Beta Was this translation helpful? Give feedback.
All reactions