Domain crawling error on localhost, after implementing Snipcart's lazy loading solution

Continuing the discussion from Best way to lazy-load Snipcart in NextJS:

After implementing this solution, I found out that I wasn’t able to perform a test purchase on my localhost any more. I suddenly get the following error, after clicking on a payment option:

snipcart.errors.order_validation.domain_crawling

As you can see in the screenshot, the data-item-url is set to http://localhost:1313/betonnen-waskommen/finn-kleur-2/, which is the correct URL. The data-api-key also contains the correct public test API-key.

Hi there,

You have this issue because you are trying to validate an order on a website that is not publicly accessible. You will find more information here.