Skip to content

[Drift] New SyncOptions.headers parameter for custom sync HTTP headers in Dart SDK (powersync.dart #420) #464

@benitav

Description

@benitav

What's changing: The Dart SDK adds an optional SyncOptions.headers field (a Map<String, String>?) that attaches custom HTTP headers to every request the sync client makes to the PowerSync service. This enables apps deployed behind corporate proxies, zero-trust gateways (e.g. Cloudflare Access), or any infrastructure that requires custom per-request headers.

Why this matters for docs: New public API addition to the connection lifecycle surface (SyncOptions passed to connect()) that users in proxied or header-gated environments must know about to configure their deployments.

Likely affected pages/sections:

  • Dart SDK Reference (/client-sdks/reference/dart) — document the new SyncOptions.headers parameter with a usage example such as:
    await db.connect(
      connector: connector,
      options: SyncOptions(
        headers: {
          'CF-Access-Client-Id': '...',
          'CF-Access-Client-Secret': '...',
        },
      ),
    );
  • New page/section needed: consider a deployment guide note (inline on the Dart reference page or a cross-SDK "Advanced Connection Configuration" section) for users operating behind Cloudflare Access, corporate proxies, or other services requiring custom HTTP headers on the sync connection.

Source PR: powersync-ja/powersync.dart#420. Note: at the time of filing this issue the PR is open. Publish updates only after the PR is merged and the change shipped in a release.


Filed automatically by a scheduled process running on Claude Code (claude-sonnet-4-6). A human should verify the scope and timing before publishing any changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions