mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-16 14:10:52 +01:00
Bundle Iconify icons locally and enhance CSP for Tauri protocols
- Add lucide and hugeicons to serverBundle collections for local bundling - Add https://tauri.localhost and asset: protocol to CSP directives - Prevents CSP errors and eliminates dependency on Iconify API
This commit is contained in:
@ -68,7 +68,7 @@ export default defineNuxtConfig({
|
|||||||
includeCustomCollections: true,
|
includeCustomCollections: true,
|
||||||
},
|
},
|
||||||
serverBundle: {
|
serverBundle: {
|
||||||
collections: ['mdi', 'line-md', 'solar', 'gg', 'emojione'],
|
collections: ['mdi', 'line-md', 'solar', 'gg', 'emojione', 'lucide', 'hugeicons'],
|
||||||
},
|
},
|
||||||
|
|
||||||
customCollections: [
|
customCollections: [
|
||||||
|
|||||||
@ -20,10 +20,12 @@
|
|||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
"csp": {
|
"csp": {
|
||||||
"default-src": ["'self'", "http://tauri.localhost", "haex-extension:"],
|
"default-src": ["'self'", "http://tauri.localhost", "https://tauri.localhost", "asset:", "haex-extension:"],
|
||||||
"script-src": [
|
"script-src": [
|
||||||
"'self'",
|
"'self'",
|
||||||
"http://tauri.localhost",
|
"http://tauri.localhost",
|
||||||
|
"https://tauri.localhost",
|
||||||
|
"asset:",
|
||||||
"haex-extension:",
|
"haex-extension:",
|
||||||
"'wasm-unsafe-eval'",
|
"'wasm-unsafe-eval'",
|
||||||
"'unsafe-inline'"
|
"'unsafe-inline'"
|
||||||
@ -31,6 +33,8 @@
|
|||||||
"style-src": [
|
"style-src": [
|
||||||
"'self'",
|
"'self'",
|
||||||
"http://tauri.localhost",
|
"http://tauri.localhost",
|
||||||
|
"https://tauri.localhost",
|
||||||
|
"asset:",
|
||||||
"haex-extension:",
|
"haex-extension:",
|
||||||
"'unsafe-inline'"
|
"'unsafe-inline'"
|
||||||
],
|
],
|
||||||
@ -45,13 +49,15 @@
|
|||||||
"img-src": [
|
"img-src": [
|
||||||
"'self'",
|
"'self'",
|
||||||
"http://tauri.localhost",
|
"http://tauri.localhost",
|
||||||
|
"https://tauri.localhost",
|
||||||
|
"asset:",
|
||||||
"haex-extension:",
|
"haex-extension:",
|
||||||
"data:",
|
"data:",
|
||||||
"blob:"
|
"blob:"
|
||||||
],
|
],
|
||||||
"font-src": ["'self'", "http://tauri.localhost", "haex-extension:"],
|
"font-src": ["'self'", "http://tauri.localhost", "https://tauri.localhost", "asset:", "haex-extension:"],
|
||||||
"object-src": ["'none'"],
|
"object-src": ["'none'"],
|
||||||
"media-src": ["'self'", "http://tauri.localhost", "haex-extension:"],
|
"media-src": ["'self'", "http://tauri.localhost", "https://tauri.localhost", "asset:", "haex-extension:"],
|
||||||
"frame-src": ["haex-extension:"],
|
"frame-src": ["haex-extension:"],
|
||||||
"frame-ancestors": ["'none'"],
|
"frame-ancestors": ["'none'"],
|
||||||
"base-uri": ["'self'"]
|
"base-uri": ["'self'"]
|
||||||
|
|||||||
Reference in New Issue
Block a user