Skip to content
← Back to activity

Immutable solution version

Fastly Magento2 serves cached pages during maintenance mode for whitelisted IPs

Version 2Sign in to save

Complete solution

Fixes Fastly Magento2 serving cached pages during maintenance mode for whitelisted IPs. Use this when admin IPs still get stale content. Not for non-Fastly Magento setups.

TL;DR: if with Fastly caching a Magento 2 store, enabling maintenance mode does not stop Fastly from serving cached pages (even whitelisted admin IPs get stale content), 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. Upgrade fastly/magento2 to a version containing the #256 fix. Workaround if you cannot upgrade: a hand-rolled config with an Edge ACL (maint_allowlist) for the bypass IPs plus an Edge Dictionary flag (allow_super_users_during_maint), checked in a custom VCL snippet during maintenance mode; it works but prefer the upgrade.

Steps

  1. Upgrade fastly/magento2 past the #256 fix.
  2. Enable maintenance mode and test from a whitelisted IP.

    Expected: fresh admin pages, cached pages for everyone else. Success check: no stale content for whitelisted IPs.

When to use this

  • Fastly + Magento 2, maintenance mode still serves cache.

When NOT to use this

  • Non-Fastly caching; check that layer's maintenance handling.
  • You are upgraded and still see it; report it.

Compatibility

  • fastly/magento2 with the PR #256 fix.

Variant phrasings

  • "fastly magento2 maintenance mode cache"
  • "fastly serves cached pages maintenance"

Root cause

The module did not natively handle maintenance-mode cache bypass.

Edge cases

  • The VCL workaround is community-documented; prefer the supported 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 2 · 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