Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Fixes #7747 Part 3
Problem: The original logic for detectFrameworkHost was inverted: it was set to true when skipWaitPort was true, meaning IPv4/IPv6 auto-detection was only enabled when port checking was skipped. This caused connection failures in Node.js 24.x environments where the framework server binds to IPv6 ([::1]) but the proxy attempts to connect via IPv4 (127.0.0.1).
Solution: Fixed the logic to:
settings.detectFrameworkHost = !options.skipWaitPort
Now IPv4/IPv6 auto-detection is correctly enabled when port checking is active (skipWaitPort = false), allowing the proxy to automatically switch between 127.0.0.1 and [::1] if connection attempts fail with ECONNREFUSED.
Impact:
When port checking is enabled → detectFrameworkHost = true → proxy can detect and switch IP versions ✓
When port checking is skipped → detectFrameworkHost = false → no auto-detection needed ✓
Testing:
✅ Tested with Nuxt 4.x on Node.js 24.6.0 where server binds to IPv6
✅ Verified proxy successfully switches from IPv4 to IPv6 on connection failure
✅ Maintains backward compatibility