Monthly Archives: May 2019

  1. Magento 2 Showing Wrong Customer IP

    Sometimes instead of the real customer IP address, you can see 127.0.0.1 or some other wrong customer IP in your Magento 2 Admin panel. It can be due to proxies, like Varnish, that may be enabled on your store.

    To solve the wrong IP address issue you need to create a new file in M2 directory:

    app/etc/XIP/di.xml

    Add this code:

    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\HTTP\PhpEnvironment\RemoteAddress">
    <arguments>
    <argument name="alternativeHeaders" xsi:type="array">
    <item name="x-client-ip" xsi:type="string">HTTP_X_REAL_IP</item>
    </argument>
    </arguments>
    </type>
    Read more »
  2. Configure Image Lazy Load In Magento 2

    To configure image lazy loading in Magento 2 you can install Magento 2 Image Lazy Load Extension by Magefan. Then navigate to Magento 2 Admin Panel > Stores > Configuration > Magefan Extensions > Lazy Load.

    Magento 2 Image Lazy Load Configuration

    Read more »