diff --git a/excalidraw-app/index.html b/excalidraw-app/index.html
index a2919e512..3a5c01e10 100644
--- a/excalidraw-app/index.html
+++ b/excalidraw-app/index.html
@@ -95,6 +95,11 @@
color: #fff;
}
+
+
+
+
+
<% if (typeof PROD != 'undefined' && PROD == true) { %>
+
+
+
+
<% } else { %>
- <% } %>
-
-
-
-
-
-
-
-
-
-
-
-
- <% if (typeof PROD != 'undefined' && PROD == true) { %>
-
-
-
- <% } else { %>
<% } %>
-
+
+
+
+
+
+
+
+
<% if (typeof VITE_APP_DEV_DISABLE_LIVE_RELOAD != 'undefined' &&
VITE_APP_DEV_DISABLE_LIVE_RELOAD == true) { %>
+
+
+
+
+
+ `,
+ );
+ }
},
};
};
diff --git a/setupTests.ts b/setupTests.ts
index 0b331db08..3884fbd47 100644
--- a/setupTests.ts
+++ b/setupTests.ts
@@ -72,12 +72,14 @@ vi.mock(
...mod,
ExcalidrawFont: class extends ExcalidrawFontImpl {
public async getContent(): Promise {
- if (this.url.protocol !== "file:") {
+ const url = this.urls[0];
+
+ if (url.protocol !== "file:") {
return super.getContent();
}
// read local assets directly, without running a server
- const content = await fs.promises.readFile(this.url);
+ const content = await fs.promises.readFile(url);
return `data:font/woff2;base64,${content.toString("base64")}`;
}
},
diff --git a/vercel.json b/vercel.json
index dc077e41b..6949dfcef 100644
--- a/vercel.json
+++ b/vercel.json
@@ -6,7 +6,7 @@
"headers": [
{
"key": "Access-Control-Allow-Origin",
- "value": "*"
+ "value": "https://excalidraw.com"
},
{
"key": "X-Content-Type-Options",
@@ -21,6 +21,32 @@
"value": "origin"
}
]
+ },
+ {
+ "source": "/:file*.woff2",
+ "headers": [
+ {
+ "key": "Cache-Control",
+ "value": "public, max-age=31536000"
+ },
+ {
+ "key": "Access-Control-Allow-Origin",
+ "value": "https://excalidraw.com"
+ }
+ ]
+ },
+ {
+ "source": "/(Virgil|Cascadia|Assistant-Regular).woff2",
+ "headers": [
+ {
+ "key": "Cache-Control",
+ "value": "public, max-age=31536000"
+ },
+ {
+ "key": "Access-Control-Allow-Origin",
+ "value": "*"
+ }
+ ]
}
],
"redirects": [