added config option to configure default endpoint