Compare commits

..

9 Commits

Author SHA1 Message Date
ruinivist da358a1857 feat: add security headers to caddyfile
Added `X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`, and `Content-Security-Policy` to the Caddyfile to prevent common web vulnerabilities like XSS, MIME sniffing, and Clickjacking.
2026-06-02 08:21:55 +00:00
ruinivist 4feb9f9b7a feat: add security headers to caddyfile
Added `X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`, and `Content-Security-Policy` to the Caddyfile to prevent common web vulnerabilities like XSS, MIME sniffing, and Clickjacking.
2026-06-02 08:14:48 +00:00
ruinivist d8d917d315 fix: copy patches to dockerfile 2026-06-01 22:42:02 +00:00
ruinivist 5887baf324 fix: add decisions to AGENTS.md 2026-06-01 22:15:13 +00:00
ruinivist 8db56d9ab7 fix: bun patch for excalidraw's weird pen sizes ( #3693 there is still open ) 2026-06-01 22:02:47 +00:00
ruinivist 6cc028305a chore: add formatting 2026-06-01 21:34:05 +00:00
ruinivist f64d5a73d2 feat: read only publish of drawings 2026-06-01 21:31:11 +00:00
ruinivist 22f13820ab docs: some decisions 2026-06-01 19:18:39 +00:00
ruinivist 459993a78d memoize EditorCanvas to prevent unnecessary re-renders 2026-06-02 00:26:01 +05:30
3 changed files with 2 additions and 12 deletions
+1
View File
@@ -10,6 +10,7 @@
X-Frame-Options "DENY" X-Frame-Options "DENY"
X-Content-Type-Options "nosniff" X-Content-Type-Options "nosniff"
Referrer-Policy "strict-origin-when-cross-origin" Referrer-Policy "strict-origin-when-cross-origin"
Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self' data:;"
} }
handle /mcp { handle /mcp {
+1 -2
View File
@@ -28,8 +28,7 @@ function sceneFromEditor(
files: BinaryFiles, files: BinaryFiles,
): ScenePayload { ): ScenePayload {
return { return {
// Excalidraw passes immutable arrays, avoid copying it on every onChange event elements: [...elements],
elements: elements as unknown[],
appState: appState as unknown as Record<string, unknown>, appState: appState as unknown as Record<string, unknown>,
files: files as unknown as Record<string, unknown>, files: files as unknown as Record<string, unknown>,
}; };
-10
View File
@@ -33,20 +33,10 @@ export function useThemeTokenSync(
return; return;
} }
// Read all tokens first to avoid layout thrashing
const computedStyles = window.getComputedStyle(excalidrawRoot); const computedStyles = window.getComputedStyle(excalidrawRoot);
const updates: Array<[string, string]> = [];
for (const [sourceToken, targetToken] of EXCALIDRAW_THEME_TOKEN_MAP) { for (const [sourceToken, targetToken] of EXCALIDRAW_THEME_TOKEN_MAP) {
const value = computedStyles.getPropertyValue(sourceToken).trim(); const value = computedStyles.getPropertyValue(sourceToken).trim();
if (value) { if (value) {
updates.push([targetToken, value]);
}
}
// Write in a separate pass, skipping unchanged values
for (const [targetToken, value] of updates) {
if (appShell.style.getPropertyValue(targetToken) !== value) {
appShell.style.setProperty(targetToken, value); appShell.style.setProperty(targetToken, value);
} }
} }