Magento

DataDome Magento with Fastly CDN integration detects and protects against bot activity.

This module is dedicated for use with Magento utilizing Fastly CDN.

DataDome works as a preflight to detect bots. A fingerprint is sent and DataDome detects in real-time if the traffic is legitimate or not.

This module leverages Fastly integration into Magento.

Prerequisites

Before integrating DataDome bot protection in Magento, you need to:

  • Ask Fastly Support to enable DataDome support for your Fastly service as described here
  • Use Fastly integration version 1.2.127 or higher in Magento
  • Have DataDome server-side key available in your DataDome dashboard
  • Have access to Magento StoreFront Admin Portal
  • Have already set up Fastly as Caching system for your Magento website

How to install and configure

1. Enable Fastly Edge Modules

  1. Connect to your Magento StoreFront Admin Portal
  2. Go to Stores > Configuration > Advanced > System > Full Page Cache > Advanced Configuration
  3. Find Enable Fastly Edge Modules and select Yes then press the Save Config button at the top-right.
729

After enabling, the Fastly Edge Module sub-menu should appear as seen below:

1002

Click on Manage and then Refresh. Select DataDome Bot Detection integration in the list and click on Save.

1109

2. Configure DataDome integration

  1. Click on the wheel icon

  2. Paste your server-side key inside the Field API Key and click on Upload. The server-side key is found in the DataDome dashboard.

🚧

You need to contact Fastly Support to enable advanced features (Pragmas) before enabling this change.

  1. You are now protected by DataDome Bot & Fraud Protection

Settings

SettingDescriptionRequiredDefault
API KeyYour DataDome License keyYes
Exclusion regexThe regex that will be applied to req.url.pathYes(?i)\.(avi|flv|mka|mkv|mov|mp4|mpeg|mpg|mp3|flac|ogg|ogm|opus|wav|webm|webp|bmp|gif|ico|jpeg|jpg|png|svg|svgz|swf|eot|otf|ttf|woff|woff2|css|less|js)$
Connection timeoutHow long to wait for a timeout (in milliseconds)Yes150
First byte timeoutHow long to wait for the first byte (in milliseconds)Yes50
Between bytes timeoutHow long to wait between bytes (in milliseconds)Yes50
Enable referrer restorationRestore original referrer when a challenge is passed.Nofalse
Enable GraphQL support for POST requestsEnable GraphQL extraction of operation name on POST request.Nofalse
Enable Replay protectionEnable prevention of replay attack in case of Early-Data requests.Nofalse

FAQ

How can I get Fastly full VCL to troubleshoot any issue ?

  • You can download it by going to : Stores > Configuration > System > Full Page Cache > Fastly Configuration > Tools > List all versions
  • Select the lastest version and click on the "eye" to see it and download it

How can I update Datadome Edge module ?

You can update the Datadome Edge Module when they got updated in a new Fastly Magento module release by following the steps below:

Ensure your installed Fastly Magento module is the most up-to-date version

  • Click the Manage button in the Fastly Edge Modules section
  • Click Refresh and Save buttons on right-top
  • Click the gear button of Datadome's Edge module and re-update it