Skip to content

Commit f7fe524

Browse files
committed
feat: apply serve.json config to necessary UI apps
1 parent 8f66b98 commit f7fe524

File tree

4 files changed

+118
-2
lines changed

4 files changed

+118
-2
lines changed

packages/apps/job-launcher/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"start": "vite",
4747
"build": "vite build",
4848
"preview": "vite preview",
49-
"start:prod": "serve -s dist",
49+
"start:prod": "serve -c ./serve.json",
5050
"format:prettier": "prettier --write \"**/*.{ts,tsx,js,jsx}\"",
5151
"format:lint": "eslint --fix \"**/*.{ts,tsx,js,jsx}\"",
5252
"format": "yarn format:prettier && yarn format:lint",
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"public": "dist",
3+
"symlinks": true,
4+
"trailingSlash": false,
5+
"headers": [
6+
{
7+
"source": "**/*.html",
8+
"headers": [
9+
{
10+
"key": "Cache-Control",
11+
"value": "no-cache"
12+
},
13+
{
14+
"key": "Content-Security-Policy",
15+
"value": "frame-ancestors: 'none';"
16+
},
17+
{
18+
"key": "Strict-Transport-Security",
19+
"value": "max-age=63072000; includeSubDomains; preload"
20+
},
21+
{
22+
"key": "X-Content-Type-Options",
23+
"value": "nosniff"
24+
},
25+
{
26+
"key": "X-Frame-Options",
27+
"value": "DENY"
28+
},
29+
{
30+
"key": "Referrer-Policy",
31+
"value": "no-referrer"
32+
},
33+
{
34+
"key": "Permissions-Policy",
35+
"value": "geolocation=(), microphone=(), camera=()"
36+
}
37+
]
38+
},
39+
{
40+
"source": "**/*.{js,css,woff2}",
41+
"headers": [
42+
{
43+
"key": "Cache-Control",
44+
"value": "public, max-age=31536000, immutable"
45+
}
46+
]
47+
},
48+
{
49+
"source": "**/*.{ico,svg,jpg,png}",
50+
"headers": [
51+
{
52+
"key": "Cache-Control",
53+
"value": "public, max-age=3600"
54+
}
55+
]
56+
}
57+
]
58+
}

packages/apps/staking/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"start": "vite",
1010
"build": "vite build",
1111
"preview": "vite preview",
12-
"start:prod": "serve -s dist",
12+
"start:prod": "serve -c ./serve.json",
1313
"format:prettier": "prettier --write \"**/*.{ts,tsx,js,jsx}\"",
1414
"format:lint": "eslint --fix \"**/*.{ts,tsx,js,jsx}\"",
1515
"format": "yarn format:prettier && yarn format:lint",

packages/apps/staking/serve.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"public": "dist",
3+
"symlinks": true,
4+
"trailingSlash": false,
5+
"headers": [
6+
{
7+
"source": "**/*.html",
8+
"headers": [
9+
{
10+
"key": "Cache-Control",
11+
"value": "no-cache"
12+
},
13+
{
14+
"key": "Content-Security-Policy",
15+
"value": "frame-ancestors: 'none';"
16+
},
17+
{
18+
"key": "Strict-Transport-Security",
19+
"value": "max-age=63072000; includeSubDomains; preload"
20+
},
21+
{
22+
"key": "X-Content-Type-Options",
23+
"value": "nosniff"
24+
},
25+
{
26+
"key": "X-Frame-Options",
27+
"value": "DENY"
28+
},
29+
{
30+
"key": "Referrer-Policy",
31+
"value": "no-referrer"
32+
},
33+
{
34+
"key": "Permissions-Policy",
35+
"value": "geolocation=(), microphone=(), camera=()"
36+
}
37+
]
38+
},
39+
{
40+
"source": "**/*.{js,css,woff2}",
41+
"headers": [
42+
{
43+
"key": "Cache-Control",
44+
"value": "public, max-age=31536000, immutable"
45+
}
46+
]
47+
},
48+
{
49+
"source": "**/*.{ico,svg,jpg,png}",
50+
"headers": [
51+
{
52+
"key": "Cache-Control",
53+
"value": "public, max-age=3600"
54+
}
55+
]
56+
}
57+
]
58+
}

0 commit comments

Comments
 (0)