Add more documentation.

Also do some proxy magic with X-Forwarded-Proto.