fix: prefer 127.0.0.1

With an empty API headers config like

```js
	"API": {
		"HTTPHeaders": {}
	},
```

running collect-profiles.sh shows connection errors when trying to POST to `/debug/pprof-mutex/` end point when using `localhost`.

The same errors do not occur when using `127.0.0.1`

License: MIT
Signed-off-by: 's avatarOli Evans <oli@tableflip.io>
上级 0316abc7
......@@ -3,7 +3,7 @@ set -x
set -euo pipefail
IFS=$'\n\t'
HTTP_API="${1:-localhost:5001}"
HTTP_API="${1:-127.0.0.1:5001}"
tmpdir=$(mktemp -d)
export PPROF_TMPDIR="$tmpdir"
pushd "$tmpdir"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论