fix: CSP add cdn.jsdelivr.net, fix regex syntax, fix manifest PNG->SVG
CI / lint (push) Successful in 14s
CI / security (push) Successful in 8s
CI / test (push) Failing after 22s
CI / build (push) Has been skipped

This commit is contained in:
2026-06-04 23:50:10 -04:00
parent 00f32ce9c2
commit 69e86c239b
5 changed files with 27 additions and 42 deletions
+1 -1
View File
@@ -544,7 +544,7 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware):
response.headers["Referrer-Policy"] = "strict-origin-when-cross-origin" response.headers["Referrer-Policy"] = "strict-origin-when-cross-origin"
response.headers["Content-Security-Policy"] = ( response.headers["Content-Security-Policy"] = (
"default-src 'self'; " "default-src 'self'; "
"script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://unpkg.com https://esm.sh; " "script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://unpkg.com https://esm.sh https://cdn.jsdelivr.net; "
"style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://fonts.googleapis.com; " "style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://fonts.googleapis.com; "
"img-src 'self' data: blob:; " "img-src 'self' data: blob:; "
"connect-src 'self' https://esm.sh https://unpkg.com https://cdnjs.cloudflare.com https://fonts.googleapis.com https://fonts.gstatic.com; " "connect-src 'self' https://esm.sh https://unpkg.com https://cdnjs.cloudflare.com https://fonts.googleapis.com https://fonts.gstatic.com; "
+1 -1
View File
@@ -42,7 +42,7 @@
/> />
<link <link
rel="icon" rel="icon"
type="image/png" type="image/svg+xml"
sizes="192x192" sizes="192x192"
href="/static/icons/icon-192x192.svg" href="/static/icons/icon-192x192.svg"
/> />
+1 -2
View File
@@ -405,8 +405,7 @@ async function openEditor(vaultName, filePath) {
clearTimeout(mermaidTimer); clearTimeout(mermaidTimer);
mermaidTimer = setTimeout(function() { mermaidTimer = setTimeout(function() {
var content = state.editorView ? state.editorView.state.doc.toString() : (state.fallbackEditorEl ? state.fallbackEditorEl.value : ''); var content = state.editorView ? state.editorView.state.doc.toString() : (state.fallbackEditorEl ? state.fallbackEditorEl.value : '');
var match = content.match(/```mermaid var match = content.match(/```mermaid\n([\s\S]*?)```/);
([\s\S]*?)```/);
if (match) { if (match) {
previewPanel.style.display = 'block'; previewPanel.style.display = 'block';
previewPanel.innerHTML = ''; previewPanel.innerHTML = '';
+22 -36
View File
@@ -1,7 +1,7 @@
{ {
"name": "ObsiGate", "name": "ObsiGate",
"short_name": "ObsiGate", "short_name": "ObsiGate",
"description": "Porte d'entrée web pour vos vaults Obsidian - Accédez, naviguez et recherchez dans toutes vos notes", "description": "Porte d'entree web pour vos vaults Obsidian - Accedez, naviguez et recherchez dans toutes vos notes",
"start_url": "/", "start_url": "/",
"scope": "/", "scope": "/",
"display": "standalone", "display": "standalone",
@@ -10,81 +10,67 @@
"orientation": "any", "orientation": "any",
"icons": [ "icons": [
{ {
"src": "/static/icons/icon-72x72.png", "src": "/static/icons/icon-72x72.svg",
"sizes": "72x72", "sizes": "72x72",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-96x96.png", "src": "/static/icons/icon-96x96.svg",
"sizes": "96x96", "sizes": "96x96",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-128x128.png", "src": "/static/icons/icon-128x128.svg",
"sizes": "128x128", "sizes": "128x128",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-144x144.png", "src": "/static/icons/icon-144x144.svg",
"sizes": "144x144", "sizes": "144x144",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-152x152.png", "src": "/static/icons/icon-152x152.svg",
"sizes": "152x152", "sizes": "152x152",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-192x192.png", "src": "/static/icons/icon-192x192.svg",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-384x384.png", "src": "/static/icons/icon-384x384.svg",
"sizes": "384x384", "sizes": "384x384",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-512x512.png", "src": "/static/icons/icon-512x512.svg",
"sizes": "512x512", "sizes": "512x512",
"type": "image/png", "type": "image/svg+xml",
"purpose": "any" "purpose": "any"
}, },
{ {
"src": "/static/icons/icon-192x192-maskable.png", "src": "/static/icons/icon-192x192-maskable.svg",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png", "type": "image/svg+xml",
"purpose": "maskable" "purpose": "maskable"
}, },
{ {
"src": "/static/icons/icon-512x512-maskable.png", "src": "/static/icons/icon-512x512-maskable.svg",
"sizes": "512x512", "sizes": "512x512",
"type": "image/png", "type": "image/svg+xml",
"purpose": "maskable" "purpose": "maskable"
} }
], ],
"categories": ["productivity", "utilities"], "categories": ["productivity", "utilities"],
"screenshots": [
{
"src": "/static/screenshots/desktop.png",
"sizes": "1280x720",
"type": "image/png",
"form_factor": "wide"
},
{
"src": "/static/screenshots/mobile.png",
"sizes": "750x1334",
"type": "image/png",
"form_factor": "narrow"
}
],
"shortcuts": [ "shortcuts": [
{ {
"name": "Recherche", "name": "Recherche",
@@ -93,7 +79,7 @@
"url": "/?action=search", "url": "/?action=search",
"icons": [ "icons": [
{ {
"src": "/static/icons/search-96x96.png", "src": "/static/icons/search-96x96.svg",
"sizes": "96x96" "sizes": "96x96"
} }
] ]
+2 -2
View File
@@ -201,8 +201,8 @@ async function syncData() {
self.addEventListener('push', (event) => { self.addEventListener('push', (event) => {
const options = { const options = {
body: event.data ? event.data.text() : 'New update available', body: event.data ? event.data.text() : 'New update available',
icon: '/static/icons/icon-192x192.png', icon: '/static/icons/icon-192x192.svg',
badge: '/static/icons/icon-72x72.png', badge: '/static/icons/icon-72x72.svg',
vibrate: [200, 100, 200], vibrate: [200, 100, 200],
data: { data: {
dateOfArrival: Date.now(), dateOfArrival: Date.now(),