The Heroku platform has a hook for application configuration settings you can leverage for this. I'd suggest you go that route. Check out http://docs.heroku.com/config-vars.
On Jan 26, 3:20 pm, Josh Coffman <[email protected]> wrote: > Thanks, Chris. Just got around to looking at your solution, and it's > exactly what I want to do. I'm also using a module/plugin for application > config from a yml file. Is there a way to include it so I can access the > configured domain name. I want to write something like this: > > def ensure_proper_protocol > return true if ssl_allowed? > > if ssl_required? && !request.ssl? > redirect_to "https://" + Config.ssl_domain + request.request_uri > flash.keep > return false > elsif request.ssl? && !ssl_required? > redirect_to "http://" + Config.http_domain + request.request_uri > flash.keep > return false > end > end > > Thanks, > -j > > Josh C. > 480-270-4578 | josh [at] computeristsolutions [dot] com > |http://computeristsolutions.com > > On Sat, Jan 23, 2010 at 7:11 AM, Chris Baglieri > <[email protected]>wrote: > > > > > Josh, > > > This question was asked just a day ago. I replied and have a post on > > the topic. Let me know if you have any further questions. Details > > can be found at: > > >http://groups.google.com/group/heroku/browse_thread/thread/a41cd5be7a... > > > Cheers, > > Chris > > > On Jan 23, 1:25 am, Josh Coffman <[email protected]> wrote: > > > Anyone know or have a suggestion for redirecting from a custom domain to > > a > > > piggy back ssl url? Just set up the custom domain name, and am currently > > > only using pig-back ssl which means I need to redirect tohttps://blah... > > > heroku.com. I'm wondering if there is a way using ssl_required, or if I > > > need to just write my own before filter? > > > > Thanks, > > > Josh > > > > Josh C. > > > 480-270-4578 | josh [at] computeristsolutions [dot] com | > >http://computeristsolutions.com > > > -- > > You received this message because you are subscribed to the Google Groups > > "Heroku" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<heroku%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
