@supabase/functions-js 2.108.3-canary.0 → 2.108.3-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/functions-js",
3
- "version": "2.108.3-canary.0",
3
+ "version": "2.108.3-canary.2",
4
4
  "description": "JS SDK to interact with Supabase Functions.",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -220,10 +220,11 @@ export class FunctionsClient {
220
220
  url.searchParams.set('forceFunctionRegion', region)
221
221
  }
222
222
  let body: any
223
- if (
224
- functionArgs &&
225
- ((headers && !Object.prototype.hasOwnProperty.call(headers, 'Content-Type')) || !headers)
226
- ) {
223
+ // HTTP header names are case-insensitive, so detect a caller-supplied Content-Type
224
+ // regardless of casing — otherwise the SDK injects a second, conflicting Content-Type.
225
+ const hasContentTypeHeader =
226
+ !!headers && Object.keys(headers).some((key) => key.toLowerCase() === 'content-type')
227
+ if (functionArgs && !hasContentTypeHeader) {
227
228
  if (
228
229
  (typeof Blob !== 'undefined' && functionArgs instanceof Blob) ||
229
230
  functionArgs instanceof ArrayBuffer
package/src/version.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.108.3-canary.0'
7
+ export const version = '2.108.3-canary.2'