-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnitro.config.ts
More file actions
64 lines (58 loc) · 1.34 KB
/
Copy pathnitro.config.ts
File metadata and controls
64 lines (58 loc) · 1.34 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { defineConfig } from "nitro";
export default defineConfig({
// vercel: {
// // functionRules: {
// // "/api/heavy-computation": {
// // maxDuration: 800,
// // memory: 4096,
// // },
// // "/api/regional": {
// // regions: ["lhr1", "cdg1"],
// // },
// // "/api/queues/process-order": {
// // experimentalTriggers: [{ type: "queue/v2beta", topic: "orders" }],
// // },
// // },
// },
// preset: "vercel",
routeRules: {
// HTML files
"/**/*.html": {
headers: {
"Cache-Control": "public, max-age=0, must-revalidate",
},
},
// Service worker
"/sw.js": {
headers: {
"Cache-Control": "public, max-age=0, must-revalidate",
},
},
// Manifest
"/app.webmanifest": {
headers: {
"Content-Type": "application/manifest+json",
},
},
// Static assets
"/assets/**": {
headers: {
"Cache-Control": "max-age=31536000, immutable",
},
},
// Global security headers
"/**": {
headers: {
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"X-XSS-Protection": "1; mode=block",
},
},
"/*.wasm": {
static: true,
headers: {
"Content-Type": "application/wasm",
},
},
},
});