Default cookie consent to GDPR and track its source
When IP geolocation does not resolve a country, or resolves one with no known cookie-consent regulation (common on localhost and unmapped regions), the banner previously fell back to OPT_OUT with no recorded regulation. Apply GDPR (OPT_IN) as the safe default in that case so the strictest consent model wins when origin is unknown. To keep consent records auditable, stamp each one with a regulation source of DETECTED (resolved from geolocation) or DEFAULT (fell back to GDPR). The shared cookiebanner.ResolveRegulation helper centralizes the decision for both the config and consent endpoints, and the new value is exposed through GraphQL, MCP, the CLI, the n8n node, and the console consent-records views. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -216,6 +216,13 @@ components:
|
||||
- PDPL
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.Regulation
|
||||
|
||||
RegulationSource:
|
||||
type: string
|
||||
enum:
|
||||
- DETECTED
|
||||
- DEFAULT
|
||||
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.RegulationSource
|
||||
|
||||
CountryCode:
|
||||
type: string
|
||||
enum:
|
||||
@@ -9715,6 +9722,10 @@ components:
|
||||
$ref: "#/components/schemas/Regulation"
|
||||
description: Applicable regulation
|
||||
nullable: true
|
||||
regulation_source:
|
||||
$ref: "#/components/schemas/RegulationSource"
|
||||
description: Whether the regulation was detected from geolocation or defaulted to GDPR
|
||||
nullable: true
|
||||
country_code:
|
||||
$ref: "#/components/schemas/CountryCode"
|
||||
description: Visitor country code (ISO 3166-1 alpha-2)
|
||||
|
||||
Reference in New Issue
Block a user