diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json index b2813a4..e239460 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json @@ -1,6 +1,6 @@ { "name": "aspnet-prerendering", - "version": "2.0.6", + "version": "3.0.1", "description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.", "main": "index.js", "scripts": { @@ -17,7 +17,7 @@ "url": "https://github.com/aspnet/JavaScriptServices.git" }, "dependencies": { - "domain-task": "^2.0.2" + "domain-task": "^3.0.0" }, "devDependencies": { "@types/node": "^6.0.42", diff --git a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts index 80a0259..a313cba 100644 --- a/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts +++ b/src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts @@ -26,6 +26,7 @@ export function createServerRenderer(bootFunc: BootFunc): RenderToStringFunc { domainTasks: domainTaskCompletionPromise, data: customDataParameter }; + const absoluteBaseUrl = params.origin + params.baseUrl; // Should be same value as page's // Open a new domain that can track all the async tasks involved in the app's execution domainTaskRun(/* code to run */ () => { @@ -35,7 +36,7 @@ export function createServerRenderer(bootFunc: BootFunc): RenderToStringFunc { bindPromiseContinuationsToDomain(domainTaskCompletionPromise, domain['active']); // Make the base URL available to the 'domain-tasks/fetch' helper within this execution context - domainTaskBaseUrl(absoluteRequestUrl); + domainTaskBaseUrl(absoluteBaseUrl); // Begin rendering, and apply a timeout const bootFuncPromise = bootFunc(params);