Re: Force https?

2010-09-14 Thread Klaas
Phil  writes:

> 
> Does anyone know how I can force all connections to myapp.heroku.com
> to run over https instead of http?  I think there are ways to
> configure this manually, but I'm wondering if it's possible with
> Heroku.  I have the ssl connection enabled for my app, but I want to
> make sure people typing in http://myapp.heroku.com get redirected to
> https.
> 
> Thanks,
> Phil
> 

Hi. Not sure if you are still looking for a way to redirect to https on heroku.
I created the rack-secure_only gem because I needed to handle exactly
what you described above.
Just use it as middleware in your rack app and it should work.

  use Rack::SecureOnly
  run MySupperDupperApp 

I have not tried it with rails... but i see no reason why it wouldn't work.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Force https?

2010-08-03 Thread Josh Coffman
I did the same thing, except I hacked ssl_requirement a little to make it
behave the way I wanted.


On Tue, Aug 3, 2010 at 7:59 AM, Jesse  wrote:

> I guess you would say this is the 'manual' way to do it :)
>
> I use ssl_requirement gem
>
> .gems file specifies ssl_requirement
>
> in app/controllers/application.rb (still on rails 2.2.2)
>
> ...
> require 'ssl_requirement'
>
> class ApplicationController < ActionController::Base
>  helper :all # include all helpers, all the time
>  # force ssl for all requests in production and staging
>  include SslRequirement unless (Rails.env.development? or
> Rails.env.test?)
>  ...
>
> in any controllers that do not need ssl override the ssl_required?
> method
>
> def ssl_required?
>  return false
> end
>
>
> On Jul 30, 1:52 pm, Phil  wrote:
> > Does anyone know how I can force all connections to myapp.heroku.com
> > to run over https instead of http?  I think there are ways to
> > configure this manually, but I'm wondering if it's possible with
> > Heroku.  I have the ssl connection enabled for my app, but I want to
> > make sure people typing inhttp://myapp.heroku.comget redirected to
> > https.
> >
> > Thanks,
> > Phil
>
> --
> You received this message because you are subscribed to the Google Groups
> "Heroku" group.
> To post to this group, send email to her...@googlegroups.com.
> To unsubscribe from this group, send email to
> heroku+unsubscr...@googlegroups.com
> .
> 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 her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Force https?

2010-08-03 Thread Jesse
I guess you would say this is the 'manual' way to do it :)

I use ssl_requirement gem

.gems file specifies ssl_requirement

in app/controllers/application.rb (still on rails 2.2.2)

...
require 'ssl_requirement'

class ApplicationController < ActionController::Base
  helper :all # include all helpers, all the time
  # force ssl for all requests in production and staging
  include SslRequirement unless (Rails.env.development? or
Rails.env.test?)
  ...

in any controllers that do not need ssl override the ssl_required?
method

def ssl_required?
  return false
end


On Jul 30, 1:52 pm, Phil  wrote:
> Does anyone know how I can force all connections to myapp.heroku.com
> to run over https instead of http?  I think there are ways to
> configure this manually, but I'm wondering if it's possible with
> Heroku.  I have the ssl connection enabled for my app, but I want to
> make sure people typing inhttp://myapp.heroku.comget redirected to
> https.
>
> Thanks,
> Phil

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Force https?

2010-08-02 Thread Kelly Heikkila

I ran across rack-secureonly lately but haven't tried it:  
http://coderack.org/users/spllr/middlewares/108-rack-secureonly

Kelly Heikkila

On Jul 30, 2010, at 3:52 PM, Phil wrote:


Does anyone know how I can force all connections to myapp.heroku.com
to run over https instead of http?  I think there are ways to
configure this manually, but I'm wondering if it's possible with
Heroku.  I have the ssl connection enabled for my app, but I want to
make sure people typing in http://myapp.heroku.com get redirected to
https.

Thanks,
Phil

--  
You received this message because you are subscribed to the Google  
Groups "Heroku" group.

To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com 
.
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 her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Force https?

2010-08-02 Thread Phil
Does anyone know how I can force all connections to myapp.heroku.com
to run over https instead of http?  I think there are ways to
configure this manually, but I'm wondering if it's possible with
Heroku.  I have the ssl connection enabled for my app, but I want to
make sure people typing in http://myapp.heroku.com get redirected to
https.

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.