Don't user server.host but server.forwardedHost as fallback for generated external URLs

Closes #698