@astrojs/cloudflare 12.6.9 → 13.0.0-alpha.0
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.
|
@@ -17,7 +17,11 @@ const GET = (ctx) => {
|
|
|
17
17
|
return Response.redirect(href, 302);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
const proxied = new URL(href, ctx.url.origin);
|
|
21
|
+
if (proxied.origin !== ctx.url.origin) {
|
|
22
|
+
return new Response("Forbidden", { status: 403 });
|
|
23
|
+
}
|
|
24
|
+
return fetch(proxied);
|
|
21
25
|
};
|
|
22
26
|
export {
|
|
23
27
|
GET,
|
package/dist/utils/handler.js
CHANGED
|
@@ -19,7 +19,6 @@ async function handle(manifest, app, request, env, context) {
|
|
|
19
19
|
return asset;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
Reflect.set(request, Symbol.for("astro.clientAddress"), request.headers.get("cf-connecting-ip"));
|
|
23
22
|
const locals = {
|
|
24
23
|
runtime: {
|
|
25
24
|
env,
|
|
@@ -44,7 +43,8 @@ async function handle(manifest, app, request, env, context) {
|
|
|
44
43
|
locals,
|
|
45
44
|
prerenderedErrorPageFetch: async (url) => {
|
|
46
45
|
return env.ASSETS.fetch(url.replace(/\.html$/, ""));
|
|
47
|
-
}
|
|
46
|
+
},
|
|
47
|
+
clientAddress: request.headers.get("cf-connecting-ip") ?? void 0
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
if (app.setCookieHeaders) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/cloudflare",
|
|
3
3
|
"description": "Deploy your site to Cloudflare Workers/Pages",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "13.0.0-alpha.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -30,22 +30,21 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@cloudflare/workers-types": "^4.
|
|
33
|
+
"@cloudflare/workers-types": "^4.20251106.1",
|
|
34
34
|
"tinyglobby": "^0.2.15",
|
|
35
|
-
"vite": "^
|
|
36
|
-
"wrangler": "4.
|
|
37
|
-
"@astrojs/internal-helpers": "0.7.
|
|
35
|
+
"vite": "^7.1.7",
|
|
36
|
+
"wrangler": "4.46.0",
|
|
37
|
+
"@astrojs/internal-helpers": "0.7.4",
|
|
38
38
|
"@astrojs/underscore-redirects": "1.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"astro": "^
|
|
41
|
+
"astro": "^6.0.0-alpha.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"cheerio": "1.1.2",
|
|
45
|
-
"devalue": "^5.
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"astro": "5.13.10",
|
|
45
|
+
"devalue": "^5.4.2",
|
|
46
|
+
"rollup": "^4.52.5",
|
|
47
|
+
"astro": "6.0.0-alpha.0",
|
|
49
48
|
"astro-scripts": "0.0.14"
|
|
50
49
|
},
|
|
51
50
|
"publishConfig": {
|