File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
examples/app-router/app/api/isr
packages/open-next/src/overrides/wrappers Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @opennextjs/aws " : patch
3+ ---
4+
5+ fix(express-dev): Disable x-powered-by header
Original file line number Diff line number Diff line change @@ -15,10 +15,13 @@ export async function GET(request: NextRequest) {
1515 const manifest = JSON . parse ( prerenderManifest ) ;
1616 const previewId = manifest . preview . previewModeId ;
1717
18- const result = await fetch ( `https://${ request . headers . get ( "host" ) } /isr` , {
19- headers : { "x-prerender-revalidate" : previewId } ,
20- method : "HEAD" ,
21- } ) ;
18+ const result = await fetch (
19+ `${ request . headers . get ( "x-forwarded-proto" ) ?? "https" } ://${ request . headers . get ( "host" ) } /isr` ,
20+ {
21+ headers : { "x-prerender-revalidate" : previewId } ,
22+ method : "HEAD" ,
23+ } ,
24+ ) ;
2225
2326 return NextResponse . json ( {
2427 status : 200 ,
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ import { getMonorepoRelativePath } from "utils/normalize-path";
88
99const wrapper : WrapperHandler = async ( handler , converter ) => {
1010 const app = express ( ) ;
11+ // We disable this cause we wanna use it ourself
12+ // https://stackoverflow.com/a/13055495/16587222
13+ app . disable ( "x-powered-by" ) ;
1114 // To serve static assets
1215 const basePath = NextConfig . basePath ?? "" ;
1316 app . use (
You can’t perform that action at this time.
0 commit comments