feat: update X-Client-Info to use structured semicolon-delimited metadata#1362
Draft
feat: update X-Client-Info to use structured semicolon-delimited metadata#1362
Conversation
…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>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ntation_imports lint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates platform and runtime metadata into the existing
X-Client-Infoheader using semicolon-delimitedkey=valuepairs, removing the separateX-Supabase-Client-PlatformandX-Supabase-Client-Platform-Versionheaders.New format
Changes
platform_io.dart: AddedcondRuntimeVersiongetter that extracts the Dart version fromPlatform.versionplatform_stub.dart: AddedcondRuntimeVersionstub returningnullfor websupabase/constants.dart: UpdatedX-Client-Infoto use structured format; removed separateX-Supabase-Client-Platform/X-Supabase-Client-Platform-Versionheaders; exposedruntimeVersiongettersupabase_flutter/constants.dart: Updated to include platform metadata insupabase-flutterX-Client-Info; changed fromconsttogetsince it now reads runtime platform valuesMotivation
Adding new standalone headers (like
X-Supabase-Client-Platform) is a breaking change forsupabase-jsin Edge Functions — users must explicitly allow headers in CORS config. SinceX-Client-Infois already allowed everywhere, embedding metadata there can be extended freely without touching CORS.Testing
X-Supabase-Client-PlatformandX-Supabase-Client-Platform-Versionare no longer sentX-Client-Infoon non-webAcceptance Criteria
X-Client-Infoincludesplatform=,platform-version=,runtime=dart,runtime-version=on non-webX-Supabase-Client-PlatformorX-Supabase-Client-Platform-Versionheaders sentsupabase-flutterpackage includes same structured metadataLinear: SDK-906
🤖 Generated with Claude Code
/take