Skip to content

Commit

Permalink
improve log of api consumer routes
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Jan 7, 2025
1 parent 211da6a commit 2ef3170
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions back/src/config/bootstrap/authMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ import { AppConfig } from "./appConfig";

const logger = createLogger(__filename);

const convertRouteToLog = (originalUrl: string) =>
`/${originalUrl.split("/")[1]}`;
const convertRouteToLog = (originalUrl: string) => {
const [_domain, ...rest] = originalUrl.split("/");
return rest.join("/").split("?")[0];
};

export type AuthorisationStatus =
| "authorised"
Expand Down

0 comments on commit 2ef3170

Please sign in to comment.