Skip to content

VS Code treats *.localhost addresses as external websites #256611

@DamianEdwards

Description

@DamianEdwards

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.103.0-insider
  • OS Version: Windows 11 24H2 26100.4652

Steps to Reproduce:

  1. Click a link in the terminal output like Now listening on https://myapp.dev.localhost:12345
    Easy repro run command like echo "Now listening on https://myapp.dev.localhost:12345" in the terminal and click the link in the text that's output
  2. VS Code treats the *.localhost address as external by default and presents the following dialog:
    Image

*.localhost is a reserved top-level domain (TLD) as per RFC 6761 that resolves to the local loopback address automatically in modern browsers (bypassing the DNS stack). It's also considered a "secure context" by browsers, even when HTTPS is not being used.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insidersverification-neededVerification of issue is requestedverifiedVerification succeededworkbench-linkLink protection in workbench

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions