Skip to content

feat: update X-Client-Info to use structured semicolon-delimited metadata#1362

Draft
grdsdev wants to merge 4 commits intomainfrom
claude/frosty-snyder-1b2f48
Draft

feat: update X-Client-Info to use structured semicolon-delimited metadata#1362
grdsdev wants to merge 4 commits intomainfrom
claude/frosty-snyder-1b2f48

Conversation

@grdsdev
Copy link
Copy Markdown
Contributor

@grdsdev grdsdev commented Apr 28, 2026

Summary

Consolidates platform and runtime metadata into the existing X-Client-Info header using semicolon-delimited key=value pairs, removing the separate X-Supabase-Client-Platform and X-Supabase-Client-Platform-Version headers.

New format

X-Client-Info: supabase-dart/2.x.x; platform=linux; platform-version=Ubuntu 22.04.3 LTS; runtime=dart; runtime-version=3.7.2
X-Client-Info: supabase-flutter/2.x.x; platform=ios; platform-version=17.0; runtime=dart; runtime-version=3.7.2

Changes

  • platform_io.dart: Added condRuntimeVersion getter that extracts the Dart version from Platform.version
  • platform_stub.dart: Added condRuntimeVersion stub returning null for web
  • supabase/constants.dart: Updated X-Client-Info to use structured format; removed separate X-Supabase-Client-Platform / X-Supabase-Client-Platform-Version headers; exposed runtimeVersion getter
  • supabase_flutter/constants.dart: Updated to include platform metadata in supabase-flutter X-Client-Info; changed from const to get since it now reads runtime platform values
  • Tests: Updated to verify structured metadata format and absence of old separate headers

Motivation

Adding new standalone headers (like X-Supabase-Client-Platform) is a breaking change for supabase-js in Edge Functions — users must explicitly allow headers in CORS config. Since X-Client-Info is already allowed everywhere, embedding metadata there can be extended freely without touching CORS.

Testing

  • All existing tests updated to verify new structured format
  • Tests confirm X-Supabase-Client-Platform and X-Supabase-Client-Platform-Version are no longer sent
  • Tests verify platform, platform-version, runtime=dart, and runtime-version appear in X-Client-Info on non-web

Acceptance Criteria

  • X-Client-Info includes platform=, platform-version=, runtime=dart, runtime-version= on non-web
  • No separate X-Supabase-Client-Platform or X-Supabase-Client-Platform-Version headers sent
  • supabase-flutter package includes same structured metadata
  • All tests pass

Linear: SDK-906


🤖 Generated with Claude Code /take

…data

Consolidates platform and runtime metadata into the existing X-Client-Info
header using semicolon-delimited key=value pairs instead of separate headers.

New format:
  supabase-dart/2.x.x; platform=linux; platform-version=...; runtime=dart; runtime-version=3.7.2
  supabase-flutter/2.x.x; platform=linux; platform-version=...; runtime=dart; runtime-version=3.7.2

Removes X-Supabase-Client-Platform and X-Supabase-Client-Platform-Version
headers since adding new standalone headers is a breaking change for
supabase-js in Edge Functions (users must explicitly allow headers in CORS).

Closes: SDK-906

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@grdsdev grdsdev requested a review from a team as a code owner April 28, 2026 08:02
grdsdev and others added 2 commits April 28, 2026 05:05
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@grdsdev grdsdev marked this pull request as draft April 28, 2026 08:08
…ntation_imports lint

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant