Skip to content
Discussion options

You must be logged in to vote

add this in your vite api proxy config, the reason should be your network don't support ipv6

import https from 'https'; 
.....

'/api': {
 ...
  secure: false, // allow proxy to  HTTPS
  agent: new https.Agent({
    family: 4, // force use  IPv4,disable IPv6
    keepAlive: true,
  }),

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jackqiu0123
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #20399 on July 12, 2025 15:43.