@vinext/cloudflare 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -73,7 +73,12 @@ var CloudflareCdnCacheAdapter = class {
|
|
|
73
73
|
async set(_key, _data, _ctx) {}
|
|
74
74
|
buildResponseHeaders(input) {
|
|
75
75
|
if (!input.cacheControl) return { "Cache-Control": NO_STORE };
|
|
76
|
-
if (/\b(?:no-store|no-cache|private)\b/.test(input.cacheControl)) return {
|
|
76
|
+
if (/\b(?:no-store|no-cache|private)\b/.test(input.cacheControl)) return {
|
|
77
|
+
"Cache-Control": input.cacheControl,
|
|
78
|
+
"CDN-Cache-Control": null,
|
|
79
|
+
"Cloudflare-CDN-Cache-Control": null,
|
|
80
|
+
"Cache-Tag": null
|
|
81
|
+
};
|
|
77
82
|
const headers = {
|
|
78
83
|
"Cache-Control": BROWSER_REVALIDATE,
|
|
79
84
|
"CDN-Cache-Control": toEdgeCacheControl(input.cacheControl)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinext/cloudflare",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Cloudflare cache adapters for vinext (KV data cache + edge CDN cache).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^25.9.2",
|
|
23
23
|
"vite-plus": "0.1.24",
|
|
24
|
-
"vinext": "0.1.
|
|
24
|
+
"vinext": "0.1.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"vinext": ">=0.0.0"
|