Skip to content

Commit 09e5bd9

Browse files
committed
fix linting
1 parent 3d253bb commit 09e5bd9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/open-next/src/http/openNextResponse.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,15 +390,16 @@ export class OpenNextNodeResponse extends Transform implements ServerResponse {
390390
// For some reason, next returns the 500 error page with some cache-control headers
391391
// We need to fix that
392392
private fixHeadersForError() {
393-
if(process.env.OPEN_NEXT_DANGEROUSLY_SET_ERROR_HEADERS === 'true') {
393+
if (process.env.OPEN_NEXT_DANGEROUSLY_SET_ERROR_HEADERS === "true") {
394394
return;
395395
}
396396
// We only check for 404 and 500 errors
397397
// The rest should be errors that are handled by the user and they should set the cache headers themselves
398398
if (this.statusCode === 404 || this.statusCode === 500) {
399399
// For some reason calling this.setHeader("Cache-Control", "no-cache, no-store, must-revalidate") does not work here
400400
// The function is not even called, i'm probably missing something obvious
401-
this.headers["cache-control"] = "private, no-cache, no-store, max-age=0, must-revalidate";
401+
this.headers["cache-control"] =
402+
"private, no-cache, no-store, max-age=0, must-revalidate";
402403
}
403404
}
404405
}

0 commit comments

Comments
 (0)