fix wsl default listen host (#542)

This commit is contained in:
ekko
2026-05-08 15:47:03 +08:00
committed by GitHub
parent d54f9479b9
commit 39acd3574a
6 changed files with 14 additions and 67 deletions
+3 -3
View File
@@ -2,8 +2,8 @@ import { describe, expect, it } from 'vitest'
import { getListenHost } from '../../packages/server/src/config'
describe('server config', () => {
it('does not force an IPv4 bind host by default', () => {
expect(getListenHost({})).toBeUndefined()
it('defaults to an IPv4 bind host', () => {
expect(getListenHost({})).toBe('0.0.0.0')
})
it('uses BIND_HOST when provided', () => {
@@ -11,6 +11,6 @@ describe('server config', () => {
})
it('ignores blank BIND_HOST values', () => {
expect(getListenHost({ BIND_HOST: ' ' })).toBeUndefined()
expect(getListenHost({ BIND_HOST: ' ' })).toBe('0.0.0.0')
})
})