Skip to content

Commit

Permalink
fix: Appended Query params to the URL (#336)
Browse files Browse the repository at this point in the history
* Appended Query params to the URL

* fix: Proxying request to remote dev server is missing query parameters
  • Loading branch information
sgollapudi77 authored Nov 5, 2021
1 parent 0895d8d commit bb85935
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/msha/routes-engine/route-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ export function parseQueryParams(req: http.IncomingMessage, matchingRouteRule: S
const matchingRewriteRouteQueryString = sanitizedUrl.searchParams.toString();
const doesMatchingRewriteRouteHaveQueryStringParameters = matchingRewriteRouteQueryString !== "";
let matchingRewriteRoutePath = matchingRewriteRoute ? matchingRewriteRoute : undefined;

if (doesMatchingRewriteRouteHaveQueryStringParameters) {
matchingRewriteRoutePath = sanitizedUrl.pathname;
matchingRewriteRoutePath = sanitizedUrl.pathname + matchingRewriteRouteQueryString;
logger.silly(` - query: ${chalk.yellow(matchingRewriteRouteQueryString)}`);
}
return { matchingRewriteRoutePath, sanitizedUrl, matchingRewriteRoute };
Expand Down

0 comments on commit bb85935

Please sign in to comment.