feat: include query params in server-to-app request mapping
This commit is contained in:
@@ -30,9 +30,11 @@ function normalizeHeaders(rawHeaders) {
|
||||
|
||||
function mapToAppRequest({ req, rawBody }) {
|
||||
const url = new URL(req.url, "http://localhost");
|
||||
const query = Object.fromEntries(url.searchParams.entries());
|
||||
return {
|
||||
method: req.method || "GET",
|
||||
path: url.pathname,
|
||||
query,
|
||||
headers: normalizeHeaders(req.headers),
|
||||
rawBody,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user