Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 61ffca6

Browse filesBrowse files
In aspnet-prerendering, parse the incoming querystring before passing it to the boot func for convenience. Fixes aspnet#638.
1 parent a9e97f6 commit 61ffca6
Copy full SHA for 61ffca6

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Collapse file

‎src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json‎

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aspnet-prerendering",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
55
"main": "index.js",
66
"scripts": {
Collapse file

‎src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts‎

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.SpaServices/npm/aspnet-prerendering/src/Prerendering.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export function createServerRenderer(bootFunc: BootFunc): RenderToStringFunc {
1616
});
1717
const parsedAbsoluteRequestUrl = url.parse(absoluteRequestUrl);
1818
const params: BootFuncParams = {
19-
location: url.parse(requestPathAndQuery),
19+
// It's helpful for boot funcs to receive the query as a key-value object, so parse it here
20+
// e.g., react-redux-router requires location.query to be a key-value object for consistency with client-side behaviour
21+
location: url.parse(requestPathAndQuery, /* parseQueryString */ true),
2022
origin: parsedAbsoluteRequestUrl.protocol + '//' + parsedAbsoluteRequestUrl.host,
2123
url: requestPathAndQuery,
2224
baseUrl: (requestPathBase || '') + '/',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.