Skip to content

fix(storage-vercel-blob): add response.ok check and downloadUrl fallback in staticHandler (#16186)#16188

Open
deepshekhardas wants to merge 1 commit intopayloadcms:mainfrom
deepshekhardas:fix/16186-static-handler-response-ok
Open

fix(storage-vercel-blob): add response.ok check and downloadUrl fallback in staticHandler (#16186)#16188
deepshekhardas wants to merge 1 commit intopayloadcms:mainfrom
deepshekhardas:fix/16186-static-handler-response-ok

Conversation

@deepshekhardas
Copy link
Copy Markdown
Contributor

Fixes #16186 - staticHandler does not check response.ok after CDN fetch

Problem: When CDN fetch fails (404 or non-200), error page HTML was returned as file data

Solution: Added response.ok check with fallback to downloadUrl from head() response

…ack in staticHandler (payloadcms#16186)

Added fallback to downloadUrl when CDN fetch returns non-ok response

This prevents error page HTML from being returned as file data

Fixes payloadcms#16186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

staticHandler does not check response.ok after CDN fetch — returns error body as file data

1 participant