Skip to content

Commit

Permalink
fix(middleware): use URL pathname to maintain exact user access path …
Browse files Browse the repository at this point in the history
…for access control
  • Loading branch information
SnowAgar25 committed Oct 27, 2024
1 parent a71410f commit ebde00b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/middleware/access-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const reject = () => {
};

const middleware: MiddlewareHandler = async (ctx, next) => {
const requestPath = ctx.req.path;
const requestPath = new URL(ctx.req.url).pathname;
const accessKey = ctx.req.query('key');
const accessCode = ctx.req.query('code');

Expand Down

0 comments on commit ebde00b

Please sign in to comment.