Skip to content

Commit 26d06c4

Browse files
g-radamg-radam
and
g-radam
authored
Stripped query params for req.url branch arm (#942)
Co-authored-by: g-radam <[email protected]>
1 parent 093bd3c commit 26d06c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/middlewares/openapi.metadata.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function applyOpenApiMetadata(
7171
req: OpenApiRequest,
7272
useRequestUrl: boolean,
7373
): OpenApiRequestMetadata {
74-
const path = useRequestUrl ? req.url : req.originalUrl.split('?')[0];
74+
const path = useRequestUrl ? req.url.split('?')[0] : req.originalUrl.split('?')[0];
7575
const method = req.method;
7676
const routeEntries = Object.entries(openApiContext.expressRouteMap);
7777
for (const [expressRoute, methods] of routeEntries) {

0 commit comments

Comments
 (0)