mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #1065] next/image: improve error message and support images.dangerouslyAllowLocalIP for private-IP rejections #232
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#232
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @github-actions[bot] on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/1065
Upstream change
Next.js commit 5452439f3db2a78967178ca4180b27fb48393a19 (PR #91686) updates the SSRF guard in
fetchExternalImageto:images.dangerouslyAllowLocalIP.dangerouslyAllowLocalIPmay be needed when hosting in a VPC with split-horizon DNS, while warning about the SSRF risk.Relevant change in
packages/next/src/server/image-optimizer.ts:A new unit test (
test/unit/image-optimizer/fetch-external-image.test.ts) confirms:400and a generic"url" parameter is not allowedmessage.dangerouslyAllowLocalIP: trueallows the fetch to proceed.Why this matters for vinext
vinext does not currently ship a full Next.js-compatible image optimizer (image handling on Cloudflare typically defers to Cloudflare Images / the platform). However, to the extent that vinext provides any next/image runtime or honors
images.*config:images.dangerouslyAllowLocalIPconfig option (and its behavior) should be supported or explicitly documented as not applicable.This is a low-priority parity item — most Cloudflare deployments will rely on the platform's image pipeline rather than vinext's own optimizer.
Action items
images.dangerouslyAllowLocalIPopt-out.References
github.com/vercel/next.js@5452439f3d