Magento Cloud and Fastly Compatibility for Extensions

Will the module work on Magento Cloud with Fastly?

Starting from version 1.7.0, the Geo IP Redirect extension works with Fastly cache, but requires a few changes in the configuration for that. Please, navigate to Advanced > System > Full Page Cache > Custom vcl snippet and setup the following settings: 

  1. Type: recv
  2. priority: 100 (default)

  3. vcl:


    if (req.http.Cookie !~ "geoip_redirect_for_varnish" 
    && req.url !~ "^/(pub/)?(media|static)/.*"
    && req.url !~ "/graphql"
    && !req.http.x-long-cache
    && req.http.X-Requested-With != "XMLHttpRequest"
    ) {
    return (pass);
    }

After that, please save the settings. These changes will automatically be pulled into the Fastly config.