Skip to content

Commit

Permalink
Merge branch 'canary' into latest-napi-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Sep 17, 2023
2 parents 6eccaf2 + 75ba27c commit 01bee40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/next/src/server/next-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function getMiddlewareMatcher(
}

export default class NextNodeServer extends BaseServer {
protected middlewareManifestPath: string
private _serverDistDir: string | undefined
private imageResponseCache?: ResponseCache
protected renderWorkersPromises?: Promise<void>
Expand Down Expand Up @@ -231,6 +232,8 @@ export default class NextNodeServer extends BaseServer {
const { interceptTestApis } = require('../experimental/testmode/server')
interceptTestApis()
}

this.middlewareManifestPath = join(this.serverDistDir, MIDDLEWARE_MANIFEST)
}

protected async handleUpgrade(): Promise<void> {
Expand Down Expand Up @@ -1335,10 +1338,7 @@ export default class NextNodeServer extends BaseServer {

protected getMiddlewareManifest(): MiddlewareManifest | null {
if (this.minimalMode) return null
const manifest: MiddlewareManifest = require(join(
this.serverDistDir,
MIDDLEWARE_MANIFEST
))
const manifest: MiddlewareManifest = require(this.middlewareManifestPath)
return manifest
}

Expand Down

0 comments on commit 01bee40

Please sign in to comment.