Skip to main content

Enabling Edge for a Property

Enabling Edge happens at two levels: the organization connects its Cloudflare account once, then each property is switched on individually. Complete the Prerequisites first.

Connect the Cloudflare Account​

Open Organization Settings → Allegro Edge.

  1. Under Cloudflare Account, click Connect Cloudflare and approve Allegro on Cloudflare's consent screen. If the button isn't there, the instance has no OAuth client: expand Use an API token instead, click Create token in Cloudflare, create the token, paste it into Paste API token, and click Save.
  2. If the connection can see more than one account, pick the one that owns the property's zones under Choose an account and click Use account.
  3. Check the permission list. An OAuth connection shows each permission as granted or missing. An API token shows "Read access confirmed. Edit access is checked on the first deploy."

The connection card shows who connected the account and when. Its status is one of:

StatusMeaning
ConnectedAllegro can reach the account.
Not workingAllegro could not use the credential. Check the token or reconnect.
Needs reconnectCloudflare revoked the OAuth grant, usually because the person who approved it lost access.

Disconnect removes the credential and revokes the OAuth grant. Workers already deployed keep running until you remove them in Cloudflare.

Choose How Workers Update​

Under Updates, Update automatically is on by default. When it's on and the instance has EDGE_AUTO_DEPLOY enabled, each new Allegro release redeploys the organization's workers. When it's off, properties keep their current worker until someone clicks Deploy now on the property. Turning it back on queues a deploy.

The Properties list on the same page shows each property's Edge status and the zone its hostname matched, or No matching zone.

Turn On a Property​

Open the property and choose Edge in its settings.

  1. Under Edge Delivery, switch on Enabled.
  2. Enter the Hostname the worker should serve, such as www.acme.com. Use the bare hostname: no scheme, path, or port. The field suggests zones from the connected account. When left blank, Allegro uses the property's domain.
  3. Save.

With automatic deploys on, saving queues a deploy. Otherwise, click Deploy now under Deployment. See Deploying the Worker.

Enabling Edge also adds https://{hostname} to the property's allowed CORS origins, so the SDK on the edge-served page can call Allegro.

Verify​

Load an article on the hostname and check the response:

  • The x-allegro-edge response header is 1.
  • The page source has <meta name="allegro-edge" content="1"> in the head and a <script id="allegro-edge-decision"> element before </body>.
  • As an anonymous visitor on a gated article, the content past the cut is missing from the HTML source, not only hidden.

See Operating Edge for the full list of markers.