Skip to content

Commit

Permalink
Add a fix for accessing nextjs cookie extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Oct 4, 2024
1 parent 1e75b00 commit abea857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/build/nextjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/ts/nextjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class NextJS {
}

static getAppDirRequestHandler<T extends PartialNextRequest>(NextResponse: typeof Response) {
const getCookieFromNextReq = this.getCookieExtractor<T>();
const getCookieFromNextReq = NextJS.getCookieExtractor<T>();

const stMiddleware = middleware<T>((req) => {
return createPreParsedRequest<T>(req, getCookieFromNextReq);
Expand Down Expand Up @@ -224,7 +224,7 @@ export default class NextJS {
req: NextRequest,
handler: (baseRequest: PreParsedRequest, baseResponse: CollectingResponse) => Promise<NextResponse>
): Promise<NextResponse> {
const getCookieFromNextReq = this.getCookieExtractor<NextRequest>();
const getCookieFromNextReq = NextJS.getCookieExtractor<NextRequest>();
let baseRequest = createPreParsedRequest<NextRequest>(req, getCookieFromNextReq);

let baseResponse = new CollectingResponse();
Expand Down

0 comments on commit abea857

Please sign in to comment.