chore: Update default host bindings from 0.0.0.0 to 127.0.0.1 for various services and examples.

This commit is contained in:
0x5487 2026-02-18 10:25:14 +08:00
parent 788003b744
commit 7cf0dc5dfc
6 changed files with 11 additions and 11 deletions

View file

@ -398,7 +398,7 @@ picoclaw gateway
"enabled": true, "enabled": true,
"channel_secret": "YOUR_CHANNEL_SECRET", "channel_secret": "YOUR_CHANNEL_SECRET",
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN", "channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
"webhook_host": "0.0.0.0", "webhook_host": "127.0.0.1",
"webhook_port": 18791, "webhook_port": 18791,
"webhook_path": "/webhook/line", "webhook_path": "/webhook/line",
"allow_from": [] "allow_from": []

View file

@ -432,7 +432,7 @@ picoclaw gateway
"enabled": true, "enabled": true,
"channel_secret": "YOUR_CHANNEL_SECRET", "channel_secret": "YOUR_CHANNEL_SECRET",
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN", "channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
"webhook_host": "0.0.0.0", "webhook_host": "127.0.0.1",
"webhook_port": 18791, "webhook_port": 18791,
"webhook_path": "/webhook/line", "webhook_path": "/webhook/line",
"allow_from": [] "allow_from": []

View file

@ -438,7 +438,7 @@ picoclaw gateway
"enabled": true, "enabled": true,
"channel_secret": "YOUR_CHANNEL_SECRET", "channel_secret": "YOUR_CHANNEL_SECRET",
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN", "channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
"webhook_host": "0.0.0.0", "webhook_host": "127.0.0.1",
"webhook_port": 18791, "webhook_port": 18791,
"webhook_path": "/webhook/line", "webhook_path": "/webhook/line",
"allow_from": [] "allow_from": []

View file

@ -25,7 +25,7 @@
}, },
"maixcam": { "maixcam": {
"enabled": false, "enabled": false,
"host": "0.0.0.0", "host": "127.0.0.1",
"port": 18790, "port": 18790,
"allow_from": [] "allow_from": []
}, },
@ -58,7 +58,7 @@
"enabled": false, "enabled": false,
"channel_secret": "YOUR_LINE_CHANNEL_SECRET", "channel_secret": "YOUR_LINE_CHANNEL_SECRET",
"channel_access_token": "YOUR_LINE_CHANNEL_ACCESS_TOKEN", "channel_access_token": "YOUR_LINE_CHANNEL_ACCESS_TOKEN",
"webhook_host": "0.0.0.0", "webhook_host": "127.0.0.1",
"webhook_port": 18791, "webhook_port": 18791,
"webhook_path": "/webhook/line", "webhook_path": "/webhook/line",
"allow_from": [] "allow_from": []
@ -141,7 +141,7 @@
"monitor_usb": true "monitor_usb": true
}, },
"gateway": { "gateway": {
"host": "0.0.0.0", "host": "127.0.0.1",
"port": 18790 "port": 18790
} }
} }

View file

@ -266,7 +266,7 @@ func DefaultConfig() *Config {
}, },
MaixCam: MaixCamConfig{ MaixCam: MaixCamConfig{
Enabled: false, Enabled: false,
Host: "0.0.0.0", Host: "127.0.0.1",
Port: 18790, Port: 18790,
AllowFrom: FlexibleStringSlice{}, AllowFrom: FlexibleStringSlice{},
}, },
@ -292,7 +292,7 @@ func DefaultConfig() *Config {
Enabled: false, Enabled: false,
ChannelSecret: "", ChannelSecret: "",
ChannelAccessToken: "", ChannelAccessToken: "",
WebhookHost: "0.0.0.0", WebhookHost: "127.0.0.1",
WebhookPort: 18791, WebhookPort: 18791,
WebhookPath: "/webhook/line", WebhookPath: "/webhook/line",
AllowFrom: FlexibleStringSlice{}, AllowFrom: FlexibleStringSlice{},
@ -319,7 +319,7 @@ func DefaultConfig() *Config {
ShengSuanYun: ProviderConfig{}, ShengSuanYun: ProviderConfig{},
}, },
Gateway: GatewayConfig{ Gateway: GatewayConfig{
Host: "0.0.0.0", Host: "127.0.0.1",
Port: 18790, Port: 18790,
}, },
Tools: ToolsConfig{ Tools: ToolsConfig{

View file

@ -67,7 +67,7 @@ func TestDefaultConfig_Temperature(t *testing.T) {
func TestDefaultConfig_Gateway(t *testing.T) { func TestDefaultConfig_Gateway(t *testing.T) {
cfg := DefaultConfig() cfg := DefaultConfig()
if cfg.Gateway.Host != "0.0.0.0" { if cfg.Gateway.Host != "127.0.0.1" {
t.Error("Gateway host should have default value") t.Error("Gateway host should have default value")
} }
if cfg.Gateway.Port == 0 { if cfg.Gateway.Port == 0 {
@ -194,7 +194,7 @@ func TestConfig_Complete(t *testing.T) {
if cfg.Agents.Defaults.MaxToolIterations == 0 { if cfg.Agents.Defaults.MaxToolIterations == 0 {
t.Error("MaxToolIterations should not be zero") t.Error("MaxToolIterations should not be zero")
} }
if cfg.Gateway.Host != "0.0.0.0" { if cfg.Gateway.Host != "127.0.0.1" {
t.Error("Gateway host should have default value") t.Error("Gateway host should have default value")
} }
if cfg.Gateway.Port == 0 { if cfg.Gateway.Port == 0 {