LogoLogo
MerchantsHelpSign in
  • Overview
    • Countries & Currencies
    • Glopal Solutions Portfolio
  • Getting started
    • Shopify
      • Glopal Duty & Tax for Shopify
      • Shopify Collaborator Access
    • BigCommerce
    • Magento (Adobe Commerce)
      • Magento 1
      • Magento 2
        • Magento Activation
        • Magento Configuration
        • Magento Database Model
    • Visualsoft
    • PrestaShop
  • Marketing Solutions
    • Acquisition channels
      • Integrate Google Ads
      • Integrate Facebook Ads
    • Feed localization
      • Read domestic items
      • Localize the items
      • Upload the localized items
    • Features / Customization
      • Google Shopping countries coverage
      • Filters
      • Free listings
      • Comparison Shopping Services (CSS)
    • Google Ads
      • Conversion tracking
      • Standard accounts structure
      • Launching and monitoring Google Ads campaigns
    • Facebook
      • Facebook & Instagram Shops
      • Catalog Based Campaigns
      • Conversion and Brand awareness campaigns
      • Facebook conversion tracking
    • Email marketing
  • Localization
    • Site localization
      • Content localization
      • Price localization
      • Site search
      • Checkout
      • User account
    • Site discovery
      • Domains and Routing
      • Search engine optimization
      • Geo-localization
      • Country selector
    • Content distribution
      • Site security
      • Domains (DNS)
      • Traffic Splitting
        • Akamai
        • Cloudflare
        • Nginx
        • Microsoft IIS
        • AWS CloudFront
        • Magento Cloud
      • Third-party CDN
        • Cloudflare
      • Site speed
    • Integrations
      • CSS customizations
      • JavaScript customizations
      • Server-side customizations
      • Exclude from localization
      • Integration examples
        • Hiding Products
        • Newsletter Signup
        • Custom Price Logic
  • Checkout
    • Localized checkout
      • Overview
      • Styling
      • Integration
        • Callback Functions
        • Confirmation Page
        • Checkout Analytics
        • Allowlisting Glopal IPs
      • Price localization
    • Order processing
      • Order creation
        • Plug & Play integration
        • Order API
        • Event webhook
        • Custom Integration
      • Cancellation & refund
      • Returns
      • Buyer's communication
      • Customer account
    • Financials
      • EU VAT
  • DUTY & TAXES
    • Product Classification
    • Duty & Tax Calculation
      • Product Pricing
      • Supported Countries
    • Compliance Checks
      • Prohibited Goods
      • Denied Party Screening
  • SHIPPING
    • Order Creation
    • Label Generation
    • Manifest
    • Tracking
  • Translations
    • Translation Editor
  • MERCHANT ACCOUNT
    • Dashboards
      • SEO dashboard
  • What's New
    • Release Notes
Powered by GitBook
On this page
  1. Localization
  2. Content distribution
  3. Traffic Splitting

Magento Cloud

PreviousAWS CloudFrontNextThird-party CDN

Last updated 3 months ago

Fastly CDN is available in staging and production environments.

To setup traffic split using Fastly, please ensure you are using the latest Fastly CDN for Magento module and verify that Fastly CDN is properly configured following the .

1

Access Fastly Configuration

Login to your Magento admin and navigate to Stores > Configuration > Advanced > System > Full Page Cache > Fastly Configuration

2

Create Glopal backend

Expand the Backend Settings and click the [Create] button

3

Define a condition

Click the [Attach a condition] and select [Create a new request condition]

Set name to “Glopal Origin” and enter req.http.X-GlopalOrigin == "1" as the "Apply if expression" in the textbox. Click the [Create] button to save the condition.

4

Complete backend configuration

Set backend name to “Glopal Origin” and enter the address as provided by Glopal. Ensure shielding remains set as (none).

5

Create two new VCL snippets

Under Custom VCL Snippets create two new VCL snippets.

Make sure to replace GLOPAL_HOSTNAME and GLOPAL_SECRET placeholders with the value you receive from Glopal and that PATTERN is a regular expression describing list of in-scope paths you want to delegate to Glopal.

vcl_recv snippet

Name: Glopal recv Type: recv Priority: 100

if ( req.restarts == 0 ) {
   remove req.http.X-GlopalOrigin;
}

# Forward target to Glopal
if ( req.url.path ~ "^/()($|[:/?])" ) {
   set req.http.X-GlopalOrigin = "1";
   set req.http.X-Forwarded-Host = req.http.Host;
}

# Whitelist when Glopal is fetching source
if ( req.http.X-Glopal == "" ) {
   set req.http.x-sigsci-no-inspection = "disabled";
}

vcl_backend_fetch snippet

Name: Glopal backend_fetch Type: backend_fetch Priority: 100

if ( bereq.http.X-GlopalOrigin ) {
  set bereq.http.Host = "";
  unset bereq.http.X-GlopalOrigin;
}
6

Upload configuration

Back under Fastly Configuration, click the [Upload VCL to Fastly] button.

Documentation reference

official documentation
Adobe Commerce: Configuring Fastly
Adobe Commerce: Getting started with custom VCL
Fastly VCL reference