fix: CSP add cdn.jsdelivr.net, fix regex syntax, fix manifest PNG->SVG
This commit is contained in:
+1
-1
@@ -544,7 +544,7 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware):
|
||||
response.headers["Referrer-Policy"] = "strict-origin-when-cross-origin"
|
||||
response.headers["Content-Security-Policy"] = (
|
||||
"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; "
|
||||
"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; "
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
type="image/svg+xml"
|
||||
sizes="192x192"
|
||||
href="/static/icons/icon-192x192.svg"
|
||||
/>
|
||||
|
||||
@@ -405,8 +405,7 @@ async function openEditor(vaultName, filePath) {
|
||||
clearTimeout(mermaidTimer);
|
||||
mermaidTimer = setTimeout(function() {
|
||||
var content = state.editorView ? state.editorView.state.doc.toString() : (state.fallbackEditorEl ? state.fallbackEditorEl.value : '');
|
||||
var match = content.match(/```mermaid
|
||||
([\s\S]*?)```/);
|
||||
var match = content.match(/```mermaid\n([\s\S]*?)```/);
|
||||
if (match) {
|
||||
previewPanel.style.display = 'block';
|
||||
previewPanel.innerHTML = '';
|
||||
|
||||
+22
-36
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"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": "/",
|
||||
"scope": "/",
|
||||
"display": "standalone",
|
||||
@@ -10,81 +10,67 @@
|
||||
"orientation": "any",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/icons/icon-72x72.png",
|
||||
"src": "/static/icons/icon-72x72.svg",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-96x96.png",
|
||||
"src": "/static/icons/icon-96x96.svg",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-128x128.png",
|
||||
"src": "/static/icons/icon-128x128.svg",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-144x144.png",
|
||||
"src": "/static/icons/icon-144x144.svg",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-152x152.png",
|
||||
"src": "/static/icons/icon-152x152.svg",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-192x192.png",
|
||||
"src": "/static/icons/icon-192x192.svg",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-384x384.png",
|
||||
"src": "/static/icons/icon-384x384.svg",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-512x512.png",
|
||||
"src": "/static/icons/icon-512x512.svg",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-192x192-maskable.png",
|
||||
"src": "/static/icons/icon-192x192-maskable.svg",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/static/icons/icon-512x512-maskable.png",
|
||||
"src": "/static/icons/icon-512x512-maskable.svg",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
],
|
||||
"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": [
|
||||
{
|
||||
"name": "Recherche",
|
||||
@@ -93,7 +79,7 @@
|
||||
"url": "/?action=search",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/icons/search-96x96.png",
|
||||
"src": "/static/icons/search-96x96.svg",
|
||||
"sizes": "96x96"
|
||||
}
|
||||
]
|
||||
|
||||
+2
-2
@@ -201,8 +201,8 @@ async function syncData() {
|
||||
self.addEventListener('push', (event) => {
|
||||
const options = {
|
||||
body: event.data ? event.data.text() : 'New update available',
|
||||
icon: '/static/icons/icon-192x192.png',
|
||||
badge: '/static/icons/icon-72x72.png',
|
||||
icon: '/static/icons/icon-192x192.svg',
|
||||
badge: '/static/icons/icon-72x72.svg',
|
||||
vibrate: [200, 100, 200],
|
||||
data: {
|
||||
dateOfArrival: Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user