Bunny
Prerequisites
This article assumes that the user has already:
- A pull zone configured (The website you would like to protect)
DATADOME_SERVER_SIDE_KEYavailable in your DataDome dashboard ,- Your pull zone (Caching > General) need to have Strip response cookies disabled (without that DataDome cookie will be removed from the response)
Installation
- Go to Scripting
- Click on + Add Script
- Click on Deploy with bunny.net
- Fill the following information and click on Add Script
- Script Name :
DataDome - Select Type :
Middleware - Pull Zone : Select the zone you would like to protect
- Script Name :
- Download the DataDome Bunny module and use the content of
datadome.ts - Click on Save
- Go to Environment > Secrets
- Add a new secret with key :
DATADOME_SERVER_SIDE_KEYand value the value of your DataDome Server Side Key -
- Click on Save Secret
- Click on Publish
-
When publishing the script world wide, enter a comment
v1and click on Publish Script -
Click on Connect Pull Zone
-
Select your pull zone you would like to protect
- Click on Connect Pull Zone
You are now protected by DataDome.
Configuration
The configuration is done using Bunny environment variables
Server-side settings
| Setting name | Description | Required | Default value | Example |
|---|---|---|---|---|
| DATADOME_SERVER_SIDE_KEY | Your DataDome server-side key, found in your dashboard. | Yes | - | - |
| DATADOME_TIMEOUT | Request timeout to DataDome API, in milliseconds. | No | 300 | 350 |
| DATADOME_URL_PATTERN_EXCLUSION | Regular expression to exclude URLs from the DataDome analysis. | No | List of excluded static assets below | |
| DATADOME_ENDPOINT | The Datadome endpoint to target - More info here | No | api.datadome.co |
\\.(avi|avif|bmp|css|eot|flac|flv|gif|gz|ico|jpeg|jpg|js|json|less|map|mka|mkv|mov|mp3|mp4|mpeg|mpg|ogg|ogm|opus|otf|png|svg|svgz|swf|ttf|wav|webm|webp|woff|woff2|xml|zip)$
Updated 1 day ago

