This module can be installed as a middleware with Vercel's Edge Functions and sends validation requests to the closest regional endpoints. Depending on how the API responds, the module either blocks the request or lets Vercel proceed with the intended backend.
This article will treat both server-side and client-side integrations.
Vercel provides an example you can reuse to integrate DataDome inside your Vercel app.
- Copy the
libfolder from the example to your Vercel app
- Update or create your own middleware to call the DataDome middleware (example)
- Add a DATADOME_SERVER_KEY variable inside Your Vercel Project > Project Settings > Environment Variables with the server-side key that you can find in the Management section of your dashboard
- Also add a NEXT_PUBLIC_DATADOME_CLIENT_KEY variable with the client-side key from your dashboard
- Update other settings if needed
- Redeploy your Vercel app
Congratulations! Your website is now protected against bot traffic at the Edge.
Your DataDome server-side key
Your DataDome client-side key
The timeout limit for requests sent to the DataDome API, in milliseconds
Ignores all matching URIs
Extensions for static assets
Updated 9 months ago