We've moved discussions to Discord

SSL Proxy Server in Hatchbox causes InvalidAuthenticity Error

Ugurcan Kaya
I was trying to configure plans without connecting a domain but proxy server that sets the SSL for hatchbox domain causes an error

Parameters: {"authenticity_token"=>"u3XgeYGSMvxy5Vod86cLV3IfXmMbdYfbWKbKpHgexAyIRqYNAvaIzmvH7+b9c3litOO6ogzfGlv3EXhyrfVCRQ==", "user"=>{"email"=>"[FILTERED]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Log in"}
W, [2020-01-31T08:39:48.808086 #19673]  WARN -- : [baeb5d27-8ef9-4657-b202-8f8e9ad429b3] HTTP Origin header (https://llr9.hatchboxapp.com) didn't match request.base_url (http://llr9.hatchboxapp.com)
I, [2020-01-31T08:39:48.808427 #19673]  INFO -- : [baeb5d27-8ef9-4657-b202-8f8e9ad429b3] Completed 422 Unprocessable Entity in 1ms (ActiveRecord: 0.0ms | Allocations: 554)
F, [2020-01-31T08:39:48.810420 #19673] FATAL -- : [baeb5d27-8ef9-4657-b202-8f8e9ad429b3]   
[baeb5d27-8ef9-4657-b202-8f8e9ad429b3] ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):

when I force SSL in production.rb NGNIX fails to redirect

  config.force_ssl = true

Chris Oliver
Sounds like you probably have something else going on.

I just deployed a Jumpstart Pro example app on Hatchbox and SSL works just fine on the hatchboxapp.com domain. Tested with both `force_ssl` true and false.

And the proxy does nothing more than forward HTTP and HTTPS requests to your server, nothing fancy.
Ugurcan Kaya
I cannot think of any reason for this error and logs are no help.  
Notifications
You’re not receiving notifications from this thread.