You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto-inject respects per-script `firstParty: false` opt-out (see "Per-script opt-out" below).
47
+
Auto-inject respects per-script `reverseProxyIntercept: false` opt-out (see "Per-script opt-out" below).
48
48
49
49
### SDK-specific post-processing (`postProcess` on ProxyConfig)
50
50
Some SDKs have quirks that require targeted regex patches after AST rewriting. These are defined as `postProcess` functions directly on each script's `ProxyConfig`:
@@ -61,34 +61,34 @@ The only exception is `googleAdsense` which sets `proxy: 'googleAnalytics'` to s
61
61
62
62
## Per-script opt-out
63
63
64
-
Scripts can opt out of first-party mode at two levels:
64
+
Scripts can opt out of first-party mode at three levels:
65
65
66
-
### Registry level (`proxy: false`)
67
-
Set `proxy: false`in `registry.ts`for scripts that should never be proxied. Used for scripts that require fingerprinting for core functionality:
66
+
### Registry level (no `reverseProxyIntercept` capability)
67
+
Scripts without the `reverseProxyIntercept` capability in `registry.ts`are never proxied. Used for scripts that require fingerprinting for core functionality:
68
68
-**Stripe**, **PayPal**: Fraud detection requires real client IP and browser fingerprints
69
69
-**Google reCAPTCHA**: Bot detection requires real fingerprints
70
70
-**Google Sign-In**: Auth integrity requires direct connection
71
71
72
72
These scripts also have `scriptBundling: false` to prevent AST rewriting.
73
73
74
-
### Config level (`firstParty: false` in registry config)
74
+
### Config level (`reverseProxyIntercept: false` in registry config)
This skips domain registration, auto-inject, and AST rewriting for that script. Important for scripts with `autoInject` (Plausible, PostHog, Umami, Rybbit, Databuddy) since `autoInject` runs at module setup before transforms.
@@ -102,7 +102,7 @@ This only affects AST rewriting (the transform plugin skips proxy rewrites for t
102
102
103
103
For npm-mode scripts (no download), define `autoInject` to configure the SDK's endpoint field.
104
104
105
-
For scripts that need fingerprinting (payments, CAPTCHA, auth), set `proxy: false`and `scriptBundling: false` in the registry entry.
105
+
For scripts that need fingerprinting (payments, CAPTCHA, auth), omit the `reverseProxyIntercept` capability and set`scriptBundling: false` in the registry entry.
106
106
107
107
## Privacy presets
108
108
@@ -167,8 +167,8 @@ The server handler extracts the target domain directly from the proxy path (`/_s
167
167
168
168
### Two-phase setup, configs built once
169
169
`module.ts` calls two functions:
170
-
1.`setupFirstParty(config, resolvePath)` — resolves config, builds all proxy configs once, registers proxy handler. Returns `FirstPartyConfig` with pre-built `proxyConfigs` map.
1.`setupFirstParty(config, resolvePath)` — registers the proxy handler unconditionally (handler rejects unknown domains at runtime). Returns `FirstPartyConfig`.
171
+
2.In `modules:done`: resolves capabilities for each configured script via `resolveCapabilities()`, then calls `finalizeFirstParty({...})`which builds proxy configs from the registry, collects domain privacy mappings, applies auto-injects, registers the intercept plugin, and populates runtimeConfig. Respects per-entry `reverseProxyIntercept: false` opt-out.
172
172
173
173
The transform plugin receives the pre-built `proxyConfigs` map via options — direct lookup per-script, no rebuilding.
Proxy is auto-enabled when scripts with proxy capabilities are configured. Ensure <codeclass="px-1.5 py-0.5 n-bg-active rounded text-xs font-mono">scripts: { proxy: false }</code> is not set.
0 commit comments