http serve: pass the hostname as is to user-defined onListen
handler
#24776
Labels
feat
new feature (which has been agreed to/accepted)
onListen
handler
#24776
Currently we substitute 'localhost' to hostname if the platform is windows and the hostname is "0.0.0.0" to work around the issue of browsers in windows.
deno/ext/http/00_serve.ts
Line 664 in ad5cec2
This makes sense for displaying something more convenient for users, but I think it's not appropriate if the user provide
onListen
callback toserve
because the user might want to do more than just displaying it using the hostname string (One such idea is denoland/std#5558 ).I suggest we should move that 'localhost'-substitution logic inside the default
onListen
implementation, instead of the current place.The text was updated successfully, but these errors were encountered: