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

Remove lvh.me #65

Closed
Mardoxx opened this issue Feb 9, 2025 · 8 comments · Fixed by #67
Closed

Remove lvh.me #65

Mardoxx opened this issue Feb 9, 2025 · 8 comments · Fixed by #67

Comments

@Mardoxx
Copy link

Mardoxx commented Feb 9, 2025

I don't care for someone else's domain.

@Mardoxx
Copy link
Author

Mardoxx commented Feb 9, 2025

{
type: 2,
value: 'lvh.me',
},
{
type: 2,
value: '*.lvh.me',
},

@Mardoxx
Copy link
Author

Mardoxx commented Feb 9, 2025

I don't know when, but some update, now vite is listening on

  ➜  Local:   https://localhost:5173/
  ➜  Local:   https://localhost.localdomain:5173/
  ➜  Local:   https://lvh.me:5173/
  ➜  Local:   https://vite.lvh.me:5173/

I'd love to know why.

@Mardoxx
Copy link
Author

Mardoxx commented Feb 9, 2025

basicSsl({
  domains: ['whatever.localhost'],
  certDir: './certs',
})

Does not override either. Which is not great - it shouldn't append, it should override imo.

@Mardoxx
Copy link
Author

Mardoxx commented Feb 9, 2025

Okay it seems vite's ssl automatically listens on , and accepts traffic from, all san in the cert regardless of what you set server.allowedHosts to.

@Mardoxx
Copy link
Author

Mardoxx commented Feb 9, 2025

Not sure where it is generating vite.lvh.me from though.

@bluwy
Copy link
Member

bluwy commented Feb 11, 2025

Some information about lvh.me here: https://stackoverflow.com/questions/51583321/it-is-safe-to-use-lvh-me-instead-of-localhost-for-testing

I suppose we can remove it to discourage its usage. The reason it's showing the URLs now is due to a recent Vite update that shows the possible URLs you can use to access your site locally. You were always able to access through lvh.me, just that the QoL change is revealing it.

@tkoeppen
Copy link

this is a potential future security risk (supply chain attack).
someone who own lvh.me changes dns entry from 127.0.0.1 to something else and the supply chain attack is there.

solution: remove any relation to lvh.me from the project

@peter-at-work
Copy link

peter-at-work commented Feb 19, 2025

Developers put a higher level of trust on this plugin, being under the vitejs organization, compared to external plugins that perform the same thing. References to an external service like lvh.me not controlled by vitejs, adds to the risk of supply chain attacks and information leakage.

FWIW, subdomains under localhost, like foo.bar.localhost, are starting to be resolved to 127.0.0.1 on modern operating systems, including the latest Windows network stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants