Fix #774. 

I tried "request.host", but request is nil there. This seems good enough. (TODO: Check that it actually works on redeploy.)