Magento

Origin Cloaking: A Magento Commerce 2.4.1 Feature

Share:
Origin Cloaking: A Magento Commerce 2.4.1 Feature
Origin Cloaking: A Magento Commerce 2.4.1 Feature

#html-body [data-pb-style=D2EUTYT]{justify-content:flex-start;display:flex;flex-direction:column;background-position:left top;background-size:cover;background-repeat:no-repeat;background-attachment:scroll;border-style:none;border-width:1px;border-radius:0;margin:0 0 10px;padding:10px}#html-body [data-pb-style=EGE0PO1]{border-style:none;border-width:1px;border-radius:0;margin:0;padding:0}With the recent release of Magento Commerce 2.4.1, the platform adopted several new security measures, performance capabilities, B2B tools, and fixed dozens of known issues and vulnerabilities that were apparent in previous versions. Several new features were added to make the shopping experience better for customers while making it easier for retailers to manage their online stores and protect them from hackers. Origin Cloaking, one of the latest technologies incorporated into this new Magento release, is one of the most outstanding features for merchants who want the best protection for their websites.

How Origin Cloaking Works

When Origin Cloaking is enabled, it hides the IP of all of your origin servers in order to protect them from direct access. The Origin Cloaking mechanism connects to the origin IP in such a way that Fastly is designated as the only source that can allow valid traffic through. In other words, all traffic to your Cloud infrastructure must go through the Fastly CDN (Content Delivery Network) or another established secure channel. Any traffic that tries to directly access your origin servers will effectively be blocked.

How to Bypass Fastly Cache

If you have traffic that doesn’t require caching, it’s easy to configure the Fastly service in a way that will allow certain requests to bypass the caching process. For example, if you need to troubleshoot issues with your site that you suspect may have to do with caching, you can follow these steps to get through Fastly based on URL or IP address:

  • Log in to your Magento Admin account.
  • Click on Stores, then go to Settings > Configuration > Advanced > System.
  • Click on Full Page Cache, go to Fastly Configuration, and hit Custom VCL Snippets.
  • Click Create Custom Snippet.
  • Add the VCL snippet values:
    • Name: bypass_fastly
    • Type: recv
    • Priority: 5
    • VCL snippet content for a specific IP address:
      • if (client.ip == “<Your IPv4 IP address>” || client.ip == “<Your IPv6 IP address>”) { return(pass);}
    • VCL snippet content for a specific URL pattern:
      • if (req.url ~ “/media/feeds/GoogleShoppingHiVisNew.xml”) { return (pass);}
  • Click Create.
  • Once the page reloads, click Upload VCL to Fastly (in the Fastly Configuration section).
  • After the upload is finished, refresh the cache by following the instructions given at the top of the page.

How to Modify Custom VCL Snippet

If you need to update any of the custom snippets you create, you can easily modify them by going through a similar process:

  • Log in to your Magento Admin account.
  • Click Stores, go to Settings, and then Configuration > Advanced > System.
  • Expand Full Page Cache > Fastly Configuration > Custom VCL Snippets.
  • In the Action column, click on the settings icon next to the snippet to edit it.
  • After the page reloads, click Upload VCL to Fastly in the Fastly Configuration section.
  • After the upload completes, refresh the cache according to the notification at the top of the page.

For more information about Origin Cloaking or the other features of Magento 2.4.1, you can review the release notes here!

Talk to a Wagento Expert Today

Talk to a Wagento Expert Today

Let’s Get Started

Related Posts

Your Broken eCommerce Stack is Silently Draining Revenue
eCommerce

Your Broken eCommerce Stack is Silently Draining Revenue

You Might be Losing More than You Think. Calculate it Here. Most B2B brands think they have a performance problem, a marketing problem, or a...

Read More
The Digital Maturity Challenge: What&#8217;s Holding Businesses Back?
AI

The Digital Maturity Challenge: What’s Holding Businesses Back?

We’ve all experienced the frustration of trying to run a cutting-edge app on a smartphone that’s five years past its prime-the screen freezes, the battery...

Read More
4 Order Management Problems That Are Quietly Killing Your B2B eCommerce Revenue
eCommerce

4 Order Management Problems That Are Quietly Killing Your B2B eCommerce Revenue

If your operations team spends part of every morning correcting orders before they go out the door, you are not alone — but you are...

Read More