Skip to content

Commit 21c41f9

Browse files
Merge pull request #9621 from jonathanhefner/nextjs-use-config-for-http-header
[nextjs] Use config to set HTTP `Server` header
2 parents 0a35e02 + f5afe65 commit 21c41f9

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

frameworks/TypeScript/nextjs/middleware.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

frameworks/TypeScript/nextjs/next.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
44
output: "standalone",
5+
6+
async headers() {
7+
return [
8+
{
9+
source: "/(.*?)",
10+
headers: [
11+
{ key: "Server", value: "Next.js" },
12+
],
13+
},
14+
]
15+
},
516
};
617

718
export default nextConfig;

0 commit comments

Comments
 (0)