This should just be one line:

`host: ENV['CANONICAL_HOST'] or 'www.loomio.org'`

Then you don't need any of the if statements