PhoenixKitWeb.Controllers.ConsentConfigController (phoenix_kit v1.7.71)

Copy Markdown View Source

API controller for cookie consent widget configuration.

Returns the consent widget configuration as JSON for client-side initialization. This allows the JavaScript widget to automatically inject itself into any page without requiring changes to the parent application's layout.

Summary

Functions

Returns the consent widget configuration as JSON.

Functions

config(conn, params)

Returns the consent widget configuration as JSON.

Response format:

{
  "enabled": true,
  "consent_mode": "strict",
  "frameworks": ["gdpr"],
  "icon_position": "bottom-right",
  "policy_version": "1.0",
  "cookie_policy_url": "/phoenix_kit/legal/cookie-policy",
  "privacy_policy_url": "/phoenix_kit/legal/privacy-policy",
  "google_consent_mode": false,
  "hide_for_authenticated": false,
  "is_authenticated": false,
  "show_icon": true
}