Cloudflare Worker module 2.0.0
1 day ago by ReadMe API
Breaking changes
Module import syntax
- Use ES module syntax instead of Service Worker syntax
Worker configuration settings
Renamed:
DATADOME_IP_FILTERING
→DATADOME_IP_EXCLUSION
DATADOME_URL_REGEX
→DATADOME_URL_REGEX_INCLUSION
DATADOME_JS_URL_REGEX
→DATADOME_JS_URL_REGEX_INCLUSION
DATADOME_LOG_VALUES
→DATADOME_LOGPUSH_CONFIGURATION
Removed:
DATADOME_URI_REGEX
DATADOME_URI_REGEX_EXCLUSION
DATADOME_HOSTNAME_REGEX_EXCLUSION
DATADOME_JS_URI_REGEX_EXCLUSION
DATADOME_JS_HOSTNAME_REGEX_EXCLUSION
DataDomeOptions interface
Renamed properties:
timeOut
→timeout?: number
licenseKey
→serverSideKey?: string
New properties:
ipExclusion?: string[]
- List of IPv4 and IPv6 addresses to exclude from DataDome protection; accepts ranges with CIDR notationurlPatternExclusion?: RegExp | string
- Regex pattern to exclude URLs from DataDome protectionurlPatternInclusion?: RegExp | string
- Regex pattern to include URLs for DataDome protection; all URLs will match if emptyenableDebugging?: boolean
- Enable debugging modeenableGraphQLSupport?: boolean
- Enable GraphQL supportenableReferrerRestoration?: boolean
- Enable referrer restorationmaximumBodySize?: number
- Maximum body size in bytes (default: 25KB)logpushConfiguration?: string[]
- List of enriched headers names to log inside LogpushclientSideKey?: string
- Client-side key for JS Tag injectionjsURL?: string
- URL of the JS Tag (default: https://js.datadome.co/tags.js)jsEndpoint?: string
- URL for the JS data endpointjsTagOptions?: Record<string, any>
- Options for the JS Tag in JavaScript object formatjsURLRegexExclusion?: RegExp | string
- Regex pattern to exclude URLs where JS Tag injection must not executejsURLRegexInclusion?: RegExp | string
- Regex pattern to include URLs where JS Tag injection must execute; all URLs will match if empty
Logging system
- Use Cloudflare Workers' native logging system for debugging information instead of adding debug headers to requests
Enhancements
- Add
CookiesList
to payloads sent to Protection API - Improve error logging and debugging capabilities:
- Include more details in error messages
- Change log format to be easier to parse and analyze
- Publish module as an npm package to ease installation