Skip to content

Commit

Permalink
feat(core): replace wildcard hosts, fix koishijs/webui#219
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Sep 11, 2023
1 parent 2a24e77 commit cb58d3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/satori/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ export class Router extends KoaRouter {
}

get selfUrl() {
return `http://${this.host}:${this.port}`
const wildcard = ['0.0.0.0', '::']
const host = wildcard.includes(this.host) ? '127.0.0.1' : this.host
return `http://${host}:${this.port}`
}

/**
Expand Down

0 comments on commit cb58d3d

Please sign in to comment.