@lunora/browser 1.0.0-alpha.35 → 1.0.0-alpha.37

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 CHANGED
@@ -107,7 +107,9 @@ If you deliberately drive the browser at an internal service reachable through a
107
107
  const browser = createBrowser({ binding: env.BROWSER, launch, allowPrivateTargets: true });
108
108
  ```
109
109
 
110
- Only set `allowPrivateTargets` when every URL is trusted — it re-opens the SSRF surface. The guard does not resolve DNS, so a public hostname that resolves to a private address (DNS rebinding) is out of scope; keep caller-supplied URLs trusted regardless.
110
+ Only set `allowPrivateTargets` when every URL is trusted — it re-opens the SSRF surface.
111
+
112
+ DNS rebinding is covered too: whenever `allowedHosts` is unset, the host is resolved over DoH and refused if it maps to a private address, before the browser launches and again on every redirect hop. Setting `allowedHosts` turns that re-check off, because an exact-host allowlist already closes rebinding and may deliberately name an internal host reachable over a Tunnel; pass `resolveDns: true` to force both.
111
113
 
112
114
  > This README covers the basics. For the full API, options, and guides, see the **[documentation](https://lunora.sh/docs/packages/browser)**.
113
115
 
package/dist/index.d.mts CHANGED
@@ -194,8 +194,13 @@ interface LunoraBrowserOptions {
194
194
  * trailing-dot-normalized, IPv6 brackets stripped). This is the only guard
195
195
  * that fully closes DNS rebinding: a public hostname that resolves to a
196
196
  * private/metadata IP can still be pinned out if it isn't on the list. Set it
197
- * whenever you pass client-controlled URLs to the browser. Leave it unset (the
198
- * default) to keep the previous behavior (only the string-based SSRF guard).
197
+ * whenever you pass client-controlled URLs to the browser.
198
+ *
199
+ * Leaving it unset (the default) is NOT unguarded: it turns
200
+ * {@link LunoraBrowserOptions.resolveDns} on, so every host is resolved over
201
+ * DoH and refused if it maps to a private address. Setting an allowlist turns
202
+ * that re-check off (the allowlist is the stronger guard, and may deliberately
203
+ * name an internal host); `resolveDns: true` forces both.
199
204
  */
200
205
  allowedHosts?: string[];
201
206
  /**
package/dist/index.d.ts CHANGED
@@ -194,8 +194,13 @@ interface LunoraBrowserOptions {
194
194
  * trailing-dot-normalized, IPv6 brackets stripped). This is the only guard
195
195
  * that fully closes DNS rebinding: a public hostname that resolves to a
196
196
  * private/metadata IP can still be pinned out if it isn't on the list. Set it
197
- * whenever you pass client-controlled URLs to the browser. Leave it unset (the
198
- * default) to keep the previous behavior (only the string-based SSRF guard).
197
+ * whenever you pass client-controlled URLs to the browser.
198
+ *
199
+ * Leaving it unset (the default) is NOT unguarded: it turns
200
+ * {@link LunoraBrowserOptions.resolveDns} on, so every host is resolved over
201
+ * DoH and refused if it maps to a private address. Setting an allowlist turns
202
+ * that re-check off (the allowlist is the stronger guard, and may deliberately
203
+ * name an internal host); `resolveDns: true` forces both.
199
204
  */
200
205
  allowedHosts?: string[];
201
206
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/browser",
3
- "version": "1.0.0-alpha.35",
3
+ "version": "1.0.0-alpha.37",
4
4
  "description": "Cloudflare Browser Rendering for Lunora: ctx.browser screenshots, PDF, and scraping in actions",
5
5
  "keywords": [
6
6
  "browser-rendering",
@@ -46,7 +46,7 @@
46
46
  "access": "public"
47
47
  },
48
48
  "dependencies": {
49
- "@lunora/errors": "1.0.0-alpha.28"
49
+ "@lunora/errors": "1.0.0-alpha.30"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@cloudflare/playwright": ">=1.0.0"