Rails4: Faye over HTTPS on Heroku

30 views
Skip to first unread message

Fernando Aureliano - Jobs

unread,
Sep 4, 2017, 9:53:53 AM9/4/17
to Faye users
I'm doing an app wich uses private pub gem to work, and its run ok on localhost, but not when I deploy it to heroku. I think that problem wich is HTTPS protocol on Heroku. I'm already tried almost everything to do it run on Heroku, but I did not find a solution yet. Someone already make the private pub run over HTTPS before?

my setup is:

private_pub.yml (/config)

development:
  server: "http://localhost:9292/faye"
  secret_token: "secret"
test:
  server: "http://localhost:9292/faye"
  secret_token: "secret"
production:
  server: "https://my.app.com/faye"
  secret_token: "c2c373dd2d7b8d080311d4d32f9710a7c01ee627c30a75ec1143559b74a82c75"
  signature_expiration: 86400 # one day

private_pub.ru (/)

require "bundler/setup"
require "yaml"
require "faye"
require "private_pub"

Faye::WebSocket.load_adapter('thin')

PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "production")
run PrivatePub.faye_app

I'm already tried this and this without sucess. My tutorial reference is this.

A guy was sucess at here, but I still have not figured out how.

Yes, and I'm already tried the configs for ssl on documentation: https://github.com/faye/faye-websocket-ruby

Thanks!


James Coglan

unread,
Sep 16, 2017, 4:57:38 AM9/16/17
to faye-...@googlegroups.com
On 4 September 2017 at 14:53, Fernando Aureliano - Jobs <j...@fernandoaureliano.com> wrote:
I'm doing an app wich uses private pub gem to work, and its run ok on localhost, but not when I deploy it to heroku. I think that problem wich is HTTPS protocol on Heroku. I'm already tried almost everything to do it run on Heroku, but I did not find a solution yet. Someone already make the private pub run over HTTPS before?

Have you got it running without HTTPS, so you can confirm the service is working before trying to add HTTPS config? 
Reply all
Reply to author
Forward
0 new messages