Skip to content

Commit bb85935

Browse files
authored
fix: Appended Query params to the URL (#336)
* Appended Query params to the URL * fix: Proxying request to remote dev server is missing query parameters
1 parent 0895d8d commit bb85935

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/msha/routes-engine/route-processor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ export function parseQueryParams(req: http.IncomingMessage, matchingRouteRule: S
126126
const matchingRewriteRouteQueryString = sanitizedUrl.searchParams.toString();
127127
const doesMatchingRewriteRouteHaveQueryStringParameters = matchingRewriteRouteQueryString !== "";
128128
let matchingRewriteRoutePath = matchingRewriteRoute ? matchingRewriteRoute : undefined;
129+
129130
if (doesMatchingRewriteRouteHaveQueryStringParameters) {
130-
matchingRewriteRoutePath = sanitizedUrl.pathname;
131+
matchingRewriteRoutePath = sanitizedUrl.pathname + matchingRewriteRouteQueryString;
131132
logger.silly(` - query: ${chalk.yellow(matchingRewriteRouteQueryString)}`);
132133
}
133134
return { matchingRewriteRoutePath, sanitizedUrl, matchingRewriteRoute };

0 commit comments

Comments
 (0)