Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant specify listen ip #13408

Closed
7 tasks done
eyooooo opened this issue Jun 2, 2023 · 1 comment · Fixed by #13412
Closed
7 tasks done

cant specify listen ip #13408

eyooooo opened this issue Jun 2, 2023 · 1 comment · Fixed by #13412
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)

Comments

@eyooooo
Copy link

eyooooo commented Jun 2, 2023

Describe the bug

vite --host will always use all available nic ip's, no matter what. unable to specifiy a single listen ip.

Reproduction

Steps to reproduce

  plugins: [react()],
  server: {  
    host: '172.16.0.227', 
    hmr: {
      host: '172.16.0.227'
    }
  }
})

using this config, starting vite with or without --host will always use all ips. our machines have many nic's but we only want vite to listen on a single address.

System Info

ubuntu, latest vite react

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

starting vite with or without --host will always use all ips. our machines have many nic's but we only want vite to listen on a single address.

If you start with --host, that will override the server.host as true and Vite will listen to all the IPs. But if you start without --host, Vite will only listen to 172.16.0.227. It seems Vite also shows all the IPs in that case though.

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Jun 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants