@sveltejs/kit 2.5.19 → 2.5.21
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.
- package/package.json +4 -1
- package/src/runtime/server/respond.js +4 -1
- package/src/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/kit",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.21",
|
|
4
4
|
"description": "SvelteKit is the fastest way to build Svelte apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -89,6 +89,9 @@
|
|
|
89
89
|
"engines": {
|
|
90
90
|
"node": ">=18.13"
|
|
91
91
|
},
|
|
92
|
+
"publishConfig": {
|
|
93
|
+
"provenance": true
|
|
94
|
+
},
|
|
92
95
|
"scripts": {
|
|
93
96
|
"lint": "prettier --config ../../.prettierrc --check .",
|
|
94
97
|
"check": "tsc && cd ./test/types && tsc",
|
|
@@ -116,7 +116,10 @@ export async function respond(request, options, manifest, state) {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
if (decoded.startsWith(`/${options.app_dir}`)) {
|
|
119
|
-
|
|
119
|
+
// Ensure that 404'd static assets are not cached - some adapters might apply caching by default
|
|
120
|
+
const headers = new Headers();
|
|
121
|
+
headers.set('cache-control', 'public, max-age=0, must-revalidate');
|
|
122
|
+
return text('Not found', { status: 404, headers });
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
const is_data_request = has_data_suffix(decoded);
|
package/src/version.js
CHANGED