Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion console/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ server {
# }

# Security headers (server-level — inherited by all locations)
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; img-src 'self' data: https:; font-src 'self' https://cdn.jsdelivr.net data:; connect-src 'self' ${API_ORIGIN}; frame-ancestors 'self'" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net/npm/@fontsource/ https://cdnjs.cloudflare.com/ajax/libs/highlight.js/ https://cdnjs.cloudflare.com/ajax/libs/KaTeX/; img-src 'self' data: https:; font-src 'self' https://cdn.jsdelivr.net/npm/@fontsource/ https://cdnjs.cloudflare.com/ajax/libs/KaTeX/ data:; connect-src 'self' ${API_ORIGIN}; frame-ancestors 'self'" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
Expand Down
3 changes: 2 additions & 1 deletion console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
"lodash-es": "4.18.1",
"protocol-buffers-schema": "3.6.1",
"vite": "^8.0.16",
"form-data": "^4.0.6"
"form-data": "^4.0.6",
"linkify-it": "^5.0.1"
},
"onlyBuiltDependencies": [
"esbuild",
Expand Down
17 changes: 9 additions & 8 deletions console/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions console/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,11 @@ export default defineConfig({
},
// Increase chunk size warning limit
chunkSizeWarningLimit: 1000,
// Disable Vite's modulePreload polyfill: it is the only inline <script>
// Vite injects at build time. Disabling it keeps the production bundle
// free of inline scripts so CSP `script-src 'self'` (nginx.conf) applies
// with zero violations. Modern browsers support modulepreload natively
// (Chrome 66+, FF 78+, Safari 16+); UltiCode targets only those.
modulePreload: { polyfill: false },
},
})
2 changes: 1 addition & 1 deletion management/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ server {
# }

# Security headers (server-level — inherited by all locations)
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; img-src 'self' data: https:; font-src 'self' https://cdn.jsdelivr.net data:; connect-src 'self' ${API_ORIGIN}; frame-ancestors 'self'" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net/npm/@fontsource/ https://cdnjs.cloudflare.com/ajax/libs/highlight.js/ https://cdnjs.cloudflare.com/ajax/libs/KaTeX/; img-src 'self' data: https:; font-src 'self' https://cdn.jsdelivr.net/npm/@fontsource/ data:; connect-src 'self' ${API_ORIGIN}; frame-ancestors 'self'" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
Expand Down
6 changes: 6 additions & 0 deletions management/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,11 @@ export default defineConfig({
},
},
chunkSizeWarningLimit: 1000,
// Disable Vite's modulePreload polyfill: it is the only inline <script>
// Vite injects at build time. Disabling it keeps the production bundle
// free of inline scripts so CSP `script-src 'self'` (nginx.conf) applies
// with zero violations. Modern browsers support modulepreload natively
// (Chrome 66+, FF 78+, Safari 16+); UltiCode targets only those.
modulePreload: { polyfill: false },
},
})