# fledge-shim **Repository Path**: mirrors_google/fledge-shim ## Basic Information - **Project Name**: fledge-shim - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-19 - **Last Updated**: 2025-12-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FLEDGE Shim Note: this project is on hold. Chrome's prototype FLEDGE implementation is accessible locally with feature flags, and per the [Privacy Sandbox Timeline](https://privacysandbox.com/timeline/) broader testing should be possible soon. This is the beginning of a pure-JavaScript implementation of the [FLEDGE proposal](https://github.com/WICG/turtledove/blob/main/FLEDGE.md), on top of existing browser APIs. The goal is to allow testing as much of FLEDGE as possible, in as realistic a manner as possible, given the constraint of not being able to add new features to the browser itself. ## Status This project has not yet been tested in production; use at your own risk. Furthermore, most of the API is not yet implemented. ## Building As with most JavaScript projects, you'll need Node.js and npm. Install dependencies with `npm install` as per usual. In order to build the frame, you have to set a list of allowed URL prefixes for the worklets. The frame will only allow `biddingLogicUrl` and `decisionLogicUrl` values that start with those prefixes. Each such prefix must consist of an HTTPS origin optionally followed by a path, and must end with a slash. So, for instance, you could allow worklet scripts under `https://dsp.example`, or `https://ssp.example/js/`. The reason for this is because worklet scripts have access to cross-site interest group and related data, and nothing prevents them from exfiltrating that data. So, if you're going to host the frame and have such cross-site data stored in its origin in users' browsers, you should make sure to only allow worklet scripts from sources that you trust not to do that. Once you have an allowlist, set the `ALLOWED_LOGIC_URL_PREFIXES` environment variable to the allowlist with the entries separated by commas, then run `npm run build`. For example, on Mac or Linux, you might run `ALLOWED_LOGIC_URL_PREFIXES=https://dsp.example/,https://ssp.example/js/ npm run build`; on Windows PowerShell, the equivalent would be `$Env:ALLOWED_LOGIC_URL_PREFIXES = "https://dsp.example/,https://ssp.example/js/"; npm run build`. ## Design FLEDGE requires a way to store information in the browser that is (a) accessible across all websites but (b) only through JavaScript access control. `localStorage` in a cross-origin iframe fits this well. In Chrome this is not partitioned and only JavaScript running within the iframe can read or modify the data. The shim is divided into two pieces: - A _frame_ that's embedded onto the page cross-origin in an `