Skip to content

feat: make integration proxy paths configurable per customer#759

Open
vasujain00 wants to merge 1 commit into
IABTechLab:mainfrom
vasujain00:feat/741-configurable-proxy-paths
Open

feat: make integration proxy paths configurable per customer#759
vasujain00 wants to merge 1 commit into
IABTechLab:mainfrom
vasujain00:feat/741-configurable-proxy-paths

Conversation

@vasujain00

@vasujain00 vasujain00 commented Jun 8, 2026

Copy link
Copy Markdown

Fixes #741

Summary

  • Adds a proxy_prefix() method to the IntegrationProxy trait allowing integrations to use customer-configured paths instead of hardcoded /integrations/{name} paths
  • Implements configurable proxy_path for the Didomi integration as the first adopter
  • Backwards-compatible: default behavior unchanged when proxy_path is not set

Changes

File Change
crates/trusted-server-core/src/integrations/registry.rs Added proxy_prefix() method to IntegrationProxy trait; updated get(), post(), put(), delete(), patch() helpers to use it
crates/trusted-server-core/src/integrations/didomi.rs Added proxy_path config field; overrides proxy_prefix() when set; updated routes and path stripping

Closes

Closes #741

Test plan

  • cargo test --workspace
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • JS tests: cd crates/js/lib && npx vitest run
  • JS format: cd crates/js/lib && npm run format
  • Docs format: cd docs && npm run format
  • WASM build: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • Manual testing via fastly compute serve
  • Other: New test registers_custom_proxy_path verifies custom path routes correctly and default path no longer matches

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code -- use expect("should ...")
  • Uses tracing macros (not println!)
  • New code has tests
  • No secrets or credentials committed

Fixes IABTechLab#741

Adds a `proxy_prefix()` method to the `IntegrationProxy` trait with a
default implementation that preserves existing behavior
(`/integrations/{name}`). Integrations can override this to use a
customer-configured path that is harder for ad blockers to target.

Implements the feature for the Didomi integration as the first example:

  [integrations.didomi]
  proxy_path = "my-custom-consent-path"

When `proxy_path` is set, routes are registered under
`/<proxy_path>/*` instead of the default
`/integrations/didomi/consent/*`. The same pattern can be adopted by
other integrations.

This is a backwards-compatible change -- if `proxy_path` is not set,
the default prefix is used and existing deployments are unaffected.
@vasujain00 vasujain00 marked this pull request as draft June 8, 2026 19:21
@vasujain00 vasujain00 marked this pull request as ready for review June 8, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make integration proxy paths configurable per customer

1 participant