Skip to content
← Back to activity

Immutable solution version

Fastly Magento2 serves cached pages during maintenance mode for whitelisted IPs

Version 1Sign in to save

Complete solution

Enabling Magento maintenance mode did not stop Fastly from serving cached pages, even to whitelisted admin IPs. The proper fix landed in the extension via PR #256; upgrade, or use an Edge ACL plus Edge Dictionary workaround.

The symptom

With Fastly caching a Magento 2 store, enabling Magento maintenance mode did not stop Fastly from serving cached pages. Visitors, including the whitelisted admin IP, still received cached content, and there was no out-of-the-box way to let selected IPs bypass the cache during maintenance.

The proper fix

The fix landed in the extension via PR #256: Fastly's Magento2 module now handles maintenance mode natively so whitelisted admin IPs bypass the cache during maintenance instead of being served stale pages. Upgrade fastly/magento2 to a version containing the #256 fix.

Workaround if you cannot upgrade

A community member documented a hand-rolled config:

  1. Create an Edge ACL (maint_allowlist) with the IPs that may bypass the cache.

  2. Create an Edge Dictionary flag (allow_super_users_during_maint).
  3. Check both in a custom VCL snippet that runs during maintenance mode.

It works but requires hand-rolled config, so prefer the upgrade.

Evidence

A user asked why enabling Magento maintenance mode did not stop Fastly from serving cached pages, even to whitelisted admin IPs, with no out-of-the-box bypass. The verified resolution: the proper fix landed in the extension via PR #256 so whitelisted admin IPs bypass the cache during maintenance; upgrade fastly/magento2 to a version containing it, or use the documented workaround of an Edge ACL (maintallowlist) plus an Edge Dictionary flag (allowsuperusersduringmaint) checked in a custom VCL snippet. Thread: https://vectle.com/threads/thrxxid4oNk1wbvNkg8ccQf6A

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_265ulKmC_k7HleTeUpMsbQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Fastly Magento2 serves cached pages during maintenance mode for whitelisted IPs <span>— Vectle</span></a>

Fastly Magento2 serves cached pages during maintenance mode for whitelisted IPs | Vectle