So a bug with my last patch was if you accessed a subdomain on http, you got redirected with that subdomain + the subdomain you specified...for example
http://ssl.example.com => https://ssl.ssl.example.com
I tried to keep the subdomain option to handle this, but parsing this kind of stuff is hard. Eventually I found https://github.com/pauldix/domainatrix but I don't think this library needs a dependency on it, so I just switched the :subdomain option to :host.
Change subdomain to host option
Woot, thanks Josh.