Skip to content

Commit 565e5a1

Browse files
committed
feat: 添加 crossorigin 属性以优化外部资源的预连接
1 parent 28305c3 commit 565e5a1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.vitepress/config.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export default defineConfig({
4242
},
4343
],
4444
// 预连接优化 - 减少外部资源连接延迟
45-
["link", { rel: "preconnect", href: "https://api.github.com" }],
46-
["link", { rel: "preconnect", href: "https://api.iconify.design" }],
47-
["link", { rel: "preconnect", href: "https://umami.micyou.top" }],
45+
["link", { rel: "preconnect", href: "https://api.github.com", crossorigin: "" }],
46+
["link", { rel: "preconnect", href: "https://api.iconify.design", crossorigin: "" }],
47+
["link", { rel: "preconnect", href: "https://umami.micyou.top", crossorigin: "" }],
4848
[
4949
"link",
5050
{ rel: "dns-prefetch", href: "https://avatars.githubusercontent.com" },

0 commit comments

Comments
 (0)