
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@optimizely/edge-delivery
Advanced tools
Optimizely's Edge Delivery, a library for executing Web Experiments utilizing Cloudflare's HTMLRewriter technology.
Optimizely Edge Delivery lets you execute Optimizely Web experiments on Cloudflare Workers.
You can install the Optimizely Edge Delivery SDK in any existing Cloudflare Worker, whether you already route your incoming traffic through a Cloudflare Worker, or you'd prefer to start from scratch using Cloudflare's getting started guide.
Install the Edge Delivery library using npm:
npm install @optimizely/edge-delivery
The SDK requires a Snippet ID (snippetId
) to know which configuration file to retrieve to execute your experiments.
It's recommended to set a Development URL (devUrl
) for the SDK to use as a target when testing locally or at your worker site directly.
const options = {
"snippetId": "29061560280",
"devUrl": "https://example.com/"
};
The applyExperiments
method is used to execute experiments. This method uses the request information to make experiment bucketing decisions and apply active experiment variations to the control. Any decisions or changes that cannot be made on the edge are packaged together and added to the <head>
element for execution on the browser.
import { applyExperiments } from '@optimizely/edge-delivery';
...
await applyExperiments(request, ctx, options);
Optionally, you may pass a Response object as the control in the options
parameter. This can be useful if you already have an existing Cloudflare Worker that, for example, makes modifications to the control outside of Optimizely experiments.
let control = await fetch(request);
...
const options = {
// Other options
"control": control
};
FAQs
Optimizely's Edge Delivery, a library for executing Web Experiments utilizing Cloudflare's HTMLRewriter technology.
We found that @optimizely/edge-delivery demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.