Skip to content

fix(storage): remove client-side signed URL render endpoint normalization - #2249

Merged
mandarini merged 1 commit into
masterfrom
fix/remove-signed-url-render-normalization
Apr 15, 2026
Merged

mandarini merged 1 commit into
masterfrom
fix/remove-signed-url-render-normalization

Conversation

@mandarini

@mandarini mandarini commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

What changed?

Removed the client-side normalization in StorageFileApi.createSignedUrl that rewrote signed URLs from /object/sign/ to /render/image/sign/ when transform options were present.

The client now uses the signed URL returned by the storage server as-is, without any path rewriting.

Updated tests to no longer assert a specific endpoint prefix for transform signed URLs, since the server is responsible for returning the correct path.

Why was this change needed?

The normalization was added in #2143 as a workaround for older storage-api versions that returned /object/sign/ even when transforms were requested. The storage server has returned the correct /render/image/sign/ path for transform-enabled tenants since late 2022 (supabase/storage@05824a7).

When transforms are disabled on a tenant, the server intentionally returns /object/sign/. Rewriting that path to /render/image/sign/ on the client was incorrect -- the JWT token in that case contains no transformation data, so the render endpoint cannot apply transforms anyway.

This normalization only existed in the JS SDK. Other Supabase SDKs (Dart, Kotlin, Swift, Python) do not perform this rewrite and rely on the server to return the correct path.

Breaking changes

  • This PR contains no breaking changes

Checklist

  • I have read the Contributing Guidelines
  • My PR title follows the conventional commit format: <type>(<scope>): <description>
  • I have run npx nx format to ensure consistent code formatting
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)

Additional notes

The hasTransform check is retained because it is still used to decide whether to include the transform object in the POST body sent to the server. Only the post-response URL rewriting was removed.

@mandarini
mandarini requested review from a team as code owners April 15, 2026 08:31
@github-actions github-actions Bot added the storage-js Related to the storage-js library. label Apr 15, 2026
@mandarini mandarini self-assigned this Apr 15, 2026
@pkg-pr-new

pkg-pr-new Bot commented Apr 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2249

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2249

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2249

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2249

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2249

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2249

commit: 54f6541

@mandarini
mandarini merged commit 433538b into master Apr 15, 2026
25 checks passed
@mandarini
mandarini deleted the fix/remove-signed-url-render-normalization branch April 15, 2026 10:14
mandarini pushed a commit to supabase/supabase that referenced this pull request Apr 16, 2026
This PR updates @supabase/*-js libraries to version 2.103.2.

**Source**: supabase-js-stable-release

**Changes**:
- Updated @supabase/supabase-js to 2.103.2
- Updated @supabase/auth-js to 2.103.2
- Updated @supabase/realtime-js to 2.103.2
- Updated @supabase/postgest-js to 2.103.2
- Refreshed pnpm-lock.yaml

---

## Release Notes

## v2.103.2

## 2.103.2 (2026-04-15)

### 🩹 Fixes

- **auth:** include Cloudflare error codes in NETWORK_ERROR_CODES
([#2239](supabase/supabase-js#2239))
- **auth:** remove Prettify wrapper from exported types for TypeDoc
expansion ([#2250](supabase/supabase-js#2250))
- **misc:** add explicit return types to toJSON methods for JSR compat
([#2252](supabase/supabase-js#2252))
- **storage:** remove client-side signed URL render endpoint
normalization
([#2249](supabase/supabase-js#2249))

### ❤️ Thank You

- Katerina Skroumpelou @mandarini
- Vansh Sharma @Vansh1811
## v2.103.1

## 2.103.1 (2026-04-15)

### 🩹 Fixes

- **auth:** add toJSON to AuthError for correct JSON serialization
([#2238](supabase/supabase-js#2238))
- **postgrest:** handle bigint rpc
([#2245](supabase/supabase-js#2245))
- **storage:** add toJSON to StorageError for correct JSON serialization
([#2246](supabase/supabase-js#2246))
- **storage:** apply empty transform check to download and getPublicUrl
([#2219](supabase/supabase-js#2219))

### ❤️ Thank You

- oniani1
- Vaibhav @7ttp

This PR was created automatically.

Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage-js Related to the storage-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants