This repository has been archived on 2026-09-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BPOS-MVP/apps/web
ChaiHaoandClaude Opus 5 8fe9ef8ecb Web 开发服务器改双栈全绑 —— 单栈回环怎么绑都有一族是死的
这坑栽了两次:不给 host 只绑 [::1],127.0.0.1 连不上;上次改绑 127.0.0.1,
[::1] 又连不上。浏览器把 localhost 解析到哪族全看系统心情,表现就是「时好时坏」。
回环双栈没有单 socket 的绑法,只能 any(host: true)。

代价写在配置里:会暴露到局域网 —— 但 API 从来就是 `*:8787`(Node 默认双栈 any),
Web 跟它对齐没有扩大暴露面;有登录门,且这是开发机。要收回环改回 '127.0.0.1' 即可。

实测:127.0.0.1 / [::1] / localhost 三种写法全 200,/api 代理 200。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
2026-07-28 14:55:23 +08:00
..