Make API get hostname instead of front-loading it