SSL redirects are pretty easy with nginx, you just add a line like
this to the conf.

server {
    listen 80;
    server_name my_rails_site.com;
    rewrite ^ https://my_rails_site.com/ permanent;
    }

However if you are using Nginx with a thin cluster as I image is being
done on heroku you have to do some extra work. This is what my local
test server's conf looks like: specifically line 50

https://gist.github.com/801101


It would be awesome if Heroku had a permanent ssl redirect sites with
ssl plugins, but I have not seen it yet.



On Feb 25, 9:01 am, Cristiano <[email protected]> wrote:
> I have a bit of a problem. I want my site to only work on SSL, so I
> have setup a before_filter to redirect to HTTPS if needed.
>
> The problem is that if I cache a page (and even if it get's cached on
> https) the page can then get loaded on http without being redirected.
>
> I imagine the way to solve this is to split apart the cache for https
> and http, or to somehow handle the redirect in nginx rather than in my
> app.
>
> Is there any way to do this or am I screwed?

-- 
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.

Reply via email to