-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
38 lines (36 loc) · 1.22 KB
/
Copy pathnext.config.js
File metadata and controls
38 lines (36 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/** @type {import('next').NextConfig} */
const path = require('path');
const nextConfig = {
// Repo lives under monorepo-style /workspace; pin tracing to this app.
outputFileTracingRoot: path.join(__dirname),
async headers() {
return [
{
// Version stamp — never cache (stale-wasm detector).
source: '/harness/build-id.txt',
headers: [{ key: 'Cache-Control', value: 'no-store' }],
},
{
source: '/harness/build-id-full.txt',
headers: [{ key: 'Cache-Control', value: 'no-store' }],
},
{
// Production MIME for Wasm — browsers reject wrong types with opaque failures.
source: '/harness/:path*.wasm',
headers: [
{ key: 'Content-Type', value: 'application/wasm' },
{ key: 'Cache-Control', value: 'public, max-age=3600, stale-while-revalidate=86400' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
],
},
{
source: '/harness/:path*.js',
headers: [
{ key: 'Cache-Control', value: 'public, max-age=3600, stale-while-revalidate=86400' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
],
},
];
},
};
module.exports = nextConfig;