We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2117dbf commit 446cbb1Copy full SHA for 446cbb1
1 file changed
packages/payload/src/auth/operations/refresh.ts
@@ -1,5 +1,3 @@
1
-import url from 'url'
2
-
3
import type { Collection } from '../../collections/config/types.js'
4
import type { Document, PayloadRequest } from '../../types/index.js'
5
@@ -64,8 +62,9 @@ export const refreshOperation = async (incomingArgs: Arguments): Promise<Result>
64
62
throw new Forbidden(args.req.t)
65
63
}
66
67
- const parsedURL = url.parse(args.req.url!)
68
- const isGraphQL = parsedURL.pathname === config.routes.graphQL
+ const pathname = new URL(args.req.url!).pathname
+
+ const isGraphQL = pathname === config.routes.graphQL
69
70
let user = await req.payload.db.findOne<any>({
71
collection: collectionConfig.slug,
0 commit comments