@arcjet/astro 1.0.0-beta.13 → 1.0.0-beta.15
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/internal.js +6 -5
- package/package.json +14 -14
package/internal.js
CHANGED
|
@@ -50,7 +50,7 @@ function createRemoteClient(options) {
|
|
|
50
50
|
// Transport is the HTTP client that the client uses to make requests.
|
|
51
51
|
const transport = createTransport(url);
|
|
52
52
|
const sdkStack = "ASTRO";
|
|
53
|
-
const sdkVersion = "1.0.0-beta.
|
|
53
|
+
const sdkVersion = "1.0.0-beta.15";
|
|
54
54
|
return createClient({
|
|
55
55
|
transport,
|
|
56
56
|
baseUrl: url,
|
|
@@ -93,10 +93,11 @@ function createArcjetClient(options) {
|
|
|
93
93
|
// We construct an ArcjetHeaders to normalize over Headers
|
|
94
94
|
const headers = new ArcjetHeaders(request.headers);
|
|
95
95
|
const url = new URL(request.url);
|
|
96
|
-
|
|
97
|
-
ip
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
const xArcjetIp = isDevelopment(env)
|
|
97
|
+
? headers.get("x-arcjet-ip")
|
|
98
|
+
: undefined;
|
|
99
|
+
let ip = xArcjetIp ||
|
|
100
|
+
findIp({ ip: clientAddress, headers }, { platform: platform(env), proxies });
|
|
100
101
|
if (ip === "") {
|
|
101
102
|
// If the `ip` is empty but we're in development mode, we default the IP
|
|
102
103
|
// so the request doesn't fail.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcjet/astro",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.15",
|
|
4
4
|
"description": "Arcjet helps developers protect their Astro sites in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analyze",
|
|
@@ -52,24 +52,24 @@
|
|
|
52
52
|
"test": "npm run build && npm run lint && npm run test-coverage"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@arcjet/env": "1.0.0-beta.
|
|
56
|
-
"@arcjet/headers": "1.0.0-beta.
|
|
57
|
-
"@arcjet/ip": "1.0.0-beta.
|
|
58
|
-
"@arcjet/logger": "1.0.0-beta.
|
|
59
|
-
"@arcjet/protocol": "1.0.0-beta.
|
|
60
|
-
"@arcjet/transport": "1.0.0-beta.
|
|
61
|
-
"arcjet": "1.0.0-beta.
|
|
55
|
+
"@arcjet/env": "1.0.0-beta.15",
|
|
56
|
+
"@arcjet/headers": "1.0.0-beta.15",
|
|
57
|
+
"@arcjet/ip": "1.0.0-beta.15",
|
|
58
|
+
"@arcjet/logger": "1.0.0-beta.15",
|
|
59
|
+
"@arcjet/protocol": "1.0.0-beta.15",
|
|
60
|
+
"@arcjet/transport": "1.0.0-beta.15",
|
|
61
|
+
"arcjet": "1.0.0-beta.15"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"astro": "^5.9.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@arcjet/eslint-config": "1.0.0-beta.
|
|
68
|
-
"@arcjet/rollup-config": "1.0.0-beta.
|
|
69
|
-
"@rollup/wasm-node": "4.52.
|
|
70
|
-
"astro": "5.
|
|
71
|
-
"eslint": "9.
|
|
72
|
-
"typescript": "5.9.
|
|
67
|
+
"@arcjet/eslint-config": "1.0.0-beta.15",
|
|
68
|
+
"@arcjet/rollup-config": "1.0.0-beta.15",
|
|
69
|
+
"@rollup/wasm-node": "4.52.5",
|
|
70
|
+
"astro": "5.15.1",
|
|
71
|
+
"eslint": "9.38.0",
|
|
72
|
+
"typescript": "5.9.3"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public",
|