refactor(functions): 重构静态资源处理逻辑,使用getAssetFromKV和ASSETS API
优化静态资源处理逻辑,移除自定义的handleStaticAssets函数,改用Cloudflare的getAssetFromKV和ASSETS API 添加对SPA路由的支持,当资源不存在时返回index.html 更新依赖并清理不再使用的代码
This commit is contained in:
46
temp_response2.html
Normal file
46
temp_response2.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>PixivNow</title>
|
||||
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<!-- <script
|
||||
async
|
||||
src="https://www.googletagmanager.com/gtag/js?id=%VITE_GOOGLE_ANALYTICS_ID%"
|
||||
></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || []
|
||||
function gtag() {
|
||||
dataLayer.push(arguments)
|
||||
}
|
||||
gtag('js', new Date())
|
||||
gtag('config', '%VITE_GOOGLE_ANALYTICS_ID%')
|
||||
</script> -->
|
||||
<!-- Umami Analytics -->
|
||||
<script defer src="https://cloud.umami.is/script.js" data-website-id="842d980c-5e11-4834-a2a8-5daaa285ce66"></script>
|
||||
<!-- Google Search Console -->
|
||||
<meta
|
||||
name="google-site-verification"
|
||||
content="%VITE_GOOGLE_SEARCH_CONSOLE_VERIFICATION%"
|
||||
/>
|
||||
<!-- Google AdSense -->
|
||||
<script
|
||||
async
|
||||
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=%VITE_ADSENSE_PUB_ID%"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<!-- jQuery -->
|
||||
<!-- <script src="https://unpkg.com/jquery@3.7.1/dist/jquery.js"></script> -->
|
||||
<script type="module" crossorigin src="/assets/index-DrUt9IKo.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Dleou5i9.css">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
This site requires JavaScript enabled. Please check your browser settings.
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
|
||||
</body>
|
||||
Reference in New Issue
Block a user