Skip to content

Commit

Permalink
fix: display provided hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 20, 2022
1 parent 84023f4 commit ee1df6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export async function listen (handle: RequestListener, opts: Partial<ListenOptio
let server: Server | HTTPServer

let addr: { proto: 'http' | 'https', addr: string, port: number } | null
const getURL = (host?: string, baseURL?: string) => `${addr!.proto}://${host || addr!.addr}:${addr!.port}${baseURL || opts.baseURL}`
const getURL = (host?: string, baseURL?: string) => `${addr!.proto}://${host || opts.hostname || addr!.addr}:${addr!.port}${baseURL || opts.baseURL}`

let https: Listener['https'] = false
if (opts.https) {
Expand Down

0 comments on commit ee1df6d

Please sign in to comment.