Added localhost as trusted domain
Added unit tests for serverHost and other related functions
Fixed X-Forwarded-Host parsing