X forwarded for

Closes #273 

@rcrichton if you could please review? I added the X-Forwarded-Host header as well, which seems to be pretty standard.