Skip to content

Commit 8a0c25d

Browse files
committed
fix: uri encode platform information
1 parent cc058e7 commit 8a0c25d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/supabase/lib/src/constants.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ class Constants {
1414

1515
static final Map<String, String> defaultHeaders = {
1616
'X-Client-Info': 'supabase-dart/$version',
17-
if (platform != null) 'X-Supabase-Client-Platform': platform!,
17+
if (platform != null)
18+
'X-Supabase-Client-Platform': Uri.encodeComponent(platform!),
1819
if (platformVersion != null)
19-
'X-Supabase-Client-Platform-Version': platformVersion!,
20+
'X-Supabase-Client-Platform-Version':
21+
Uri.encodeComponent(platformVersion!),
2022
};
2123
}

0 commit comments

Comments
 (0)