redirect to 'www' before force_ssl

前端 未结 3 1112
孤独总比滥情好
孤独总比滥情好 2021-02-10 19:14

I\'m moving an app to heroku and am having some issues with ssl and redirects.

I\'m on rails 3.1 and I\'ve tried forcing ssl with middleware in the environments producti

3条回答
  •  甜味超标
    2021-02-10 19:33

    You should be able to do this by running a rack redirect before the force_ssl middleware.

    This post shows you how to do it.

    http://blog.dynamic50.com/2011/02/22/redirect-all-requests-for-www-to-root-domain-with-heroku/

    Hope this helps.

提交回复
热议问题