Skip to content

Commit

Permalink
more precise path match
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcelhaney committed Mar 13, 2024
1 parent 9601b20 commit ee50592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/dispatcher.ts
Expand Up @@ -231,7 +231,7 @@ export class Dispatcher {
// If the incoming path includes the base path, remove it
if (
this.openApiDocument?.basePath !== undefined &&
path.toLowerCase().includes(this.openApiDocument.basePath.toLowerCase())
path.toLowerCase().startsWith(this.openApiDocument.basePath.toLowerCase())
) {
// eslint-disable-next-line security/detect-non-literal-regexp
path = path.replace(new RegExp(this.openApiDocument.basePath, "iu"), "");
Expand Down

0 comments on commit ee50592

Please sign in to comment.