Simple SSL sketch. Needs testing on production.

This needs testing, but I think it'll work. The SSL detection line is taken from how Google Analytics does it, so it's pretty well-tested.