Skip to content

Commit 3106a53

Browse files
authored
fix(nextjs): disable the default-server x-powered-by option on the express server (#4180)
This way, when disabling the same option in the next.config.js it doesn't just revert to express ISSUES CLOSED: #3961
1 parent d42bd2d commit 3106a53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/next/src/builders/server/lib/default-server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export async function defaultServer(
1616
await app.prepare();
1717

1818
const server: express.Express = express();
19+
server.disable('x-powered-by');
1920

2021
// Set up the proxy.
2122
if (proxyConfig) {

0 commit comments

Comments
 (0)