diff --git a/src/Employer/Employer.Web/Extensions/HtmlHelperExtensions.cs b/src/Employer/Employer.Web/Extensions/HtmlHelperExtensions.cs index 74b4502c7f..04ee193379 100644 --- a/src/Employer/Employer.Web/Extensions/HtmlHelperExtensions.cs +++ b/src/Employer/Employer.Web/Extensions/HtmlHelperExtensions.cs @@ -14,16 +14,16 @@ public static class HtmlHelperExtensions public static IHeaderViewModel GetHeaderViewModel(this IHtmlHelper html, bool hideMenu = false) { var externalLinks = (html.ViewContext.HttpContext.RequestServices.GetService(typeof(IOptions)) as IOptions).Value; - var maRoutes = (html.ViewContext.HttpContext.RequestServices.GetService(typeof(IOptions)) as IOptions).Value; var authConfig = (html.ViewContext.HttpContext.RequestServices.GetService(typeof(IOptions)) as IOptions).Value; var requestRoot = html.ViewContext.HttpContext.Request.GetRequestUrlRoot(); var requestPath = html.ViewContext.HttpContext.Request.Path; + var commitmentsSiteUrl = new Uri(externalLinks.CommitmentsSiteUrl); var headerModel = new HeaderViewModel(new HeaderConfiguration { - EmployerCommitmentsBaseUrl = externalLinks.CommitmentsSiteUrl, + EmployerCommitmentsBaseUrl = $"{commitmentsSiteUrl.Scheme}://{commitmentsSiteUrl.Host}/commitments", EmployerFinanceBaseUrl = externalLinks.ManageApprenticeshipSiteUrl, - ManageApprenticeshipsBaseUrl = externalLinks.ManageApprenticeshipSiteUrl, + ManageApprenticeshipsBaseUrl = externalLinks.ManageApprenticeshipSiteUrl, AuthenticationAuthorityUrl = authConfig.Authority, ClientId = authConfig.ClientId, EmployerRecruitBaseUrl = requestRoot,