Ok, this was causing an infinite redirect loop with https.

TODO: Fix http/https handling