@astrojs/cloudflare 13.0.0-beta.13 → 13.0.0-beta.14
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/README.md +1 -1
- package/dist/entrypoints/preview.js +1 -1
- package/dist/utils/handler.js +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @astrojs/cloudflare
|
|
2
2
|
|
|
3
|
-
An SSR adapter for use with Cloudflare Pages Functions targets. Write your code in Astro/
|
|
3
|
+
An SSR adapter for use with Cloudflare Pages Functions targets. Write your code in Astro/JavaScript and deploy to Cloudflare Pages.
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
@@ -80,7 +80,7 @@ function serverStart({
|
|
|
80
80
|
host,
|
|
81
81
|
base
|
|
82
82
|
}) {
|
|
83
|
-
const version = "13.0.0-beta.
|
|
83
|
+
const version = "13.0.0-beta.14";
|
|
84
84
|
const localPrefix = `${colors.dim("\u2503")} Local `;
|
|
85
85
|
const networkPrefix = `${colors.dim("\u2503")} Network `;
|
|
86
86
|
const emptyPrefix = " ".repeat(11);
|
package/dist/utils/handler.js
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
isStaticImagesRequest,
|
|
16
16
|
handleStaticImagesRequest
|
|
17
17
|
} from "./prerender.js";
|
|
18
|
+
import { getValidatedIpFromHeader } from "@astrojs/internal-helpers/request";
|
|
18
19
|
setGetEnv(createGetEnv(globalEnv));
|
|
19
20
|
const app = createApp();
|
|
20
21
|
async function handle(request, env, context) {
|
|
@@ -94,7 +95,7 @@ async function handle(request, env, context) {
|
|
|
94
95
|
prerenderedErrorPageFetch: async (url) => {
|
|
95
96
|
return env.ASSETS.fetch(url.replace(/\.html$/, ""));
|
|
96
97
|
},
|
|
97
|
-
clientAddress: request.headers.get("cf-connecting-ip")
|
|
98
|
+
clientAddress: getValidatedIpFromHeader(request.headers.get("cf-connecting-ip"))
|
|
98
99
|
});
|
|
99
100
|
if (app.setCookieHeaders) {
|
|
100
101
|
for (const setCookieHeader of app.setCookieHeaders(response)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/cloudflare",
|
|
3
3
|
"description": "Deploy your site to Cloudflare Workers",
|
|
4
|
-
"version": "13.0.0-beta.
|
|
4
|
+
"version": "13.0.0-beta.14",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"author": "withastro",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"piccolore": "^0.1.3",
|
|
40
40
|
"tinyglobby": "^0.2.15",
|
|
41
41
|
"vite": "^7.3.1",
|
|
42
|
-
"@astrojs/internal-helpers": "0.8.0-beta.
|
|
42
|
+
"@astrojs/internal-helpers": "0.8.0-beta.3",
|
|
43
43
|
"@astrojs/underscore-redirects": "1.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/node": "^25.2.2",
|
|
52
52
|
"cheerio": "1.2.0",
|
|
53
53
|
"devalue": "^5.6.3",
|
|
54
|
-
"astro": "6.0.0-beta.
|
|
54
|
+
"astro": "6.0.0-beta.20",
|
|
55
55
|
"astro-scripts": "0.0.14"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|