Skip to content

Commit d18989f

Browse files
docs: document and un-gate allowedDomains session setting
1 parent 3402f59 commit d18989f

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 27
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-a896c28015c625eaa4efd6319489dc91c932a6ab17780c5e1bf3648bd4bed9c7.yml
3-
openapi_spec_hash: a1ee972826c5331971d4d9b437f9e6d5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-325727e382d1635cdcff3d81e93432c314290a644a5252095fc9d23350e8fbae.yml
3+
openapi_spec_hash: 1c0874c5d6253bdf144e617203d788c7
44
config_hash: d4b0c534eaf7665ea25168e0e824c9d3

src/resources/sessions/sessions.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,18 @@ export namespace SessionCreateParams {
246246
*/
247247
advancedStealth?: boolean;
248248

249+
/**
250+
* An optional list of allowed domains for the session. If you pass one or more
251+
* domains, Browserbase restricts top-level (main-frame) page navigations to the
252+
* listed domains and their subdomains. For example, `example.com` also permits
253+
* `www.example.com` and `a.b.example.com`, but not `notexample.com`. Matching is
254+
* domain-based, not full-URL. An empty list (the default) disables the restriction
255+
* entirely. Browserbase enforces only main-frame navigations; it does not block
256+
* iframe/subframe loads or other in-page resource requests (images, scripts, XHR,
257+
* etc.).
258+
*/
259+
allowedDomains?: Array<string>;
260+
249261
/**
250262
* Enable or disable ad blocking in the browser. Defaults to `false`.
251263
*/

tests/api-resources/sessions/sessions.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ describe('resource sessions', () => {
3434
{
3535
browserSettings: {
3636
advancedStealth: true,
37+
allowedDomains: ['string'],
3738
blockAds: true,
3839
captchaImageSelector: 'captchaImageSelector',
3940
captchaInputSelector: 'captchaInputSelector',

0 commit comments

Comments
 (0)