Skip to content

Add *.localhost & *.internal to the dev cert SANs #62592

@DamianEdwards

Description

@DamianEdwards

Follow up to #61155

This will allow the dev-cert to be used for local dev scenarios where the hostname is using the .localhost or .internal TLDs.

We can update the templates to support an option (sticky) that allows new projects to launch using an application URL like https://appname.localhost:12345, where the application name is in the host name, allowing for better separation of localhost cookies, etc. Note that modern browser already resolve any .localhost host name to the localhost loopback address so no DNS changes are required for browser-based scenarios using the .localhost TLD, and the app will still respond to localhost requests too as ASP.NET Core doesn't validate the host name in the ASPNETCORE_URLS config value by default (so it's essentially an alias).

Metadata

Metadata

Assignees

Labels

area-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIfeature-devcerts

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions