Skip to content

feat(supabase): add missing HTTP headers for client platform and runtime detection#2046

Merged
mandarini merged 2 commits intomasterfrom
feat/add-missing-http-headers-2
Jan 22, 2026
Merged

feat(supabase): add missing HTTP headers for client platform and runtime detection#2046
mandarini merged 2 commits intomasterfrom
feat/add-missing-http-headers-2

Conversation

@mandarini
Copy link
Contributor

Moved from #1505
Author: @grdsdev

Summary

Add missing HTTP headers for client platform and runtime detection with simplified logic that only includes headers when detection is reliable.

New Headers Added

  • X-Supabase-Client-Platform: OS detection (macOS, Windows, Linux, iOS, Android)
  • X-Supabase-Client-Platform-Version: Platform version
  • X-Supabase-Client-Runtime: Runtime environment (node, deno, bun)
  • X-Supabase-Client-Runtime-Version: Runtime version

Key Features

  • Simple detection without regex pattern matching
  • Headers omitted when detection fails (no "unknown" values)
  • Backward compatible with existing X-Client-Info header
  • Comprehensive unit tests added

Test plan

  • All existing tests pass
  • New unit tests cover all detection functions
  • Tests verify conditional header inclusion

@mandarini mandarini self-assigned this Jan 22, 2026
@github-actions github-actions bot added the supabase-js Related to the supabase-js library. label Jan 22, 2026
@coveralls
Copy link

coveralls commented Jan 22, 2026

Coverage Status

coverage: 80.653% (-0.3%) from 80.916%
when pulling 7fbec0d on feat/add-missing-http-headers-2
into 188b83f on master.

@mandarini mandarini force-pushed the feat/add-missing-http-headers-2 branch from 36705a8 to 7fbec0d Compare January 22, 2026 12:10
@mandarini mandarini changed the title feat(supabase): add missing HTTP headers for client platform and runt… feat(supabase): add missing HTTP headers for client platform and runtime detection Jan 22, 2026
@mandarini mandarini marked this pull request as ready for review January 22, 2026 12:10
@mandarini mandarini requested a review from a team as a code owner January 22, 2026 12:10
@mandarini mandarini merged commit c8574f5 into master Jan 22, 2026
23 of 24 checks passed
@mandarini mandarini deleted the feat/add-missing-http-headers-2 branch January 22, 2026 12:20
grdsdev added a commit that referenced this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

supabase-js Related to the supabase-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants