Use getAbsoluteUrl for redirection URL
Also separate the function into getDefaultPageUrl() and redirectToDefaultPage() to make it testable.
Please register or sign in to comment
Also separate the function into getDefaultPageUrl() and redirectToDefaultPage() to make it testable.