Skip to main content
Device Permissions1 min read

Website Access: Which Pages Can Use Native Features

Control which pages and websites shown in your app may call native features through window.wapp, define the global or not, and allow test pages.

Overview

Native features such as sign-in, payments, contacts or the scanner are powerful, so not every page shown in your app may use them. Website access decides which pages can call the JavaScript Bridge.

The default

By default, every page of your app's website can use the bridge (plus your store's domain, if you connected one). Other websites shown in the app never can.

Limit access to selected pages

There are two places with the same purpose; both lists are combined.

Permissions › Website access

  1. Turn on Restrict Bridge Access.
  2. Under Allowed URL Origins, add the origins that may use the bridge, for example https://example.com. + Add App URL adds your website URL in one click.
  3. Save.

Integrations › Native plugins › Website access

  1. Turn on Only selected pages.
  2. Add rules: a whole site, pages starting with a path (for example https://example.com/account/), or an advanced pattern.
  3. Save.

Pages that do not match get BRIDGE_NOT_ALLOWED when they call a method.

Define window.wapp

If your website already uses a variable called wapp, turn off Define window.wapp in Integrations › Native plugins › Website access. The app then does not create the global, so your variable is untouched.

WebAppStudio test pages

Each plugin has a test page that tries every call. To use it in a test build of your app, allow WebAppStudio test pages in Integrations › Native plugins › Website access. The permission ends automatically after 7 days.

Updates

Website access settings are Instant Live Updates.

Tips

  • If only part of your site needs native features (for example /account/), restrict access to that part.
  • Never allow third-party domains you do not control.

Next steps