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) {
15
15
const manifest = JSON . parse ( prerenderManifest ) ;
16
16
const previewId = manifest . preview . previewModeId ;
17
17
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
+ ) ;
22
25
23
26
return NextResponse . json ( {
24
27
status : 200 ,
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ import { getMonorepoRelativePath } from "utils/normalize-path";
8
8
9
9
const wrapper : WrapperHandler = async ( handler , converter ) => {
10
10
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" ) ;
11
14
// To serve static assets
12
15
const basePath = NextConfig . basePath ?? "" ;
13
16
app . use (
You can’t perform that action at this time.
0 commit comments