Skip to content

fix(assets): add AbortSignal timeout to remote image fetch - #17639

Open
bunlongheng wants to merge 1 commit into
withastro:mainfrom
bunlongheng:fix/remote-image-fetch-timeout
Open

fix(assets): add AbortSignal timeout to remote image fetch#17639
bunlongheng wants to merge 1 commit into
withastro:mainfrom
bunlongheng:fix/remote-image-fetch-timeout

Conversation

@bunlongheng

Copy link
Copy Markdown

The remote image fetch in redirectValidation.ts passes no signal or timeout to fetchFn. A slow or unresponsive image origin server will stall the fetch indefinitely - blocking SSR responses in production and the dev server during development. Added AbortSignal.timeout(10_000) to the fetch options so the call aborts after 10 seconds rather than hanging forever.

@changeset-bot

changeset-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f30a0c7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the pkg: astro Related to the core `astro` package (scope) label Aug 8, 2026
@codspeed-hq

codspeed-hq Bot commented Aug 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 21 untouched benchmarks


Comparing bunlongheng:fix/remote-image-fetch-timeout (f30a0c7) with main (bd2c1a5)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (7c4bf1b) during the generation of this report, so bd2c1a5 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

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

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant