0xDocs 0x.limo

Docs / Security

Permissions-Policy

Powerful browser features (camera, microphone, location, USB, serial, HID, payments) are off on enforced hosted versions unless declared; fullscreen, gamepad and autoplay are always on.

Enforced versions are served with a Permissions-Policy header. It turns off powerful features your game didn't declare, so a compromised build can't suddenly ask players for their camera or location.

http
Permissions-Policy: camera=(), microphone=(), geolocation=(), usb=(), serial=(), hid=(), payment=(),
                    fullscreen=(self), gamepad=(self), autoplay=(self)
featuredefaultto use it
fullscreen, gamepad, autoplayallowed for your sitenothing
camera, microphone, geolocation, usb, serial, hid, paymentoffdeclare it in "csp"."permissions"

Declare the features your game uses in 0x.config.json:

json
{
  "csp": { "permissions": ["microphone", "gamepad"] }
}

Only the seven names in the table can be declared. gamepad above is refused with csp.permissions: one of camera, microphone, geolocation, usb, serial, hid, payment, because it is always on. A declared feature becomes =(self): allowed for your site's own origin, never for frames of other sites inside it.

The browser still asks the player before it grants a feature. The policy only decides whether your page may ask at all.

#Report-only versions

A report-only version (one published before 2026-10-17, or a site 0x switched to report-only) gets no Permissions-Policy header, because it would block. Features then follow the browser's defaults and the embedding frame's allow attribute.

#Inside the store and embeds

When your game runs inside a frame, the frame's allow attribute also limits what it may use. The 0x store and 0x.limo/embed/<id> delegate fullscreen, gamepad, autoplay, clipboard-write, screen-wake-lock and pointer-lock (the store also delegates xr-spatial-tracking and cross-origin-isolated).

Camera, microphone and location inside the store

The store's and the embed's frames don't delegate camera, microphone, geolocation, usb, serial, hid or payment today. A declared permission takes effect when players open your game's page directly (https://<site>-play.0x.limo/sites/<site>/<n>/), but not inside the 0x store or an embed. If your game depends on one of these, tell players to open it directly.

#Checking it

bash
curl -sI https://<site>-play.0x.limo/sites/<site>/<n>/ | grep -i permissions-policy

In the page, document.featurePolicy?.allowedFeatures() (Chromium) lists what is allowed.