fix unit test failures on USE_X_FORWARDED_HOST