質問

I have been having some issues with running a Rails app using the Thin web server over SSL on Heroku. One thing that I think may be causing my issues is that I am not starting the thin server using ssl (such as shown here and here). However, I do not know the correct syntax to boot a thin server using ssl on Heroku. Here are the different procfile variations I have tried with no luck:

web: thin start --ssl -p $PORT

web: bundle exec thin start --ssl -p $PORT

web: bundle exec rails s thin --ssl -p $PORT

web: thin start --ssl

役に立ちましたか?

解決

On Heroku, SSL is terminated before requests hit your app. You app will only see normal HTTP traffic. I don't think you will need to pass any parameters to thin, just start it as normal, and you should be able to access your site over HTTPS using https://example.herokuapp.com/.

If you have a custom domain, there's more info in this Dev Center article on SSL endpoints.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top