Skip to content

Commit e7670f9

Browse files
feat: update mcp proxy_pass (#8374)
1 parent 342c04b commit e7670f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: backend/app/service/mcp_server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ func addProxy(server *model.McpServer) {
430430
if !ok {
431431
return
432432
}
433-
location.UpdateDirective("proxy_pass", []string{fmt.Sprintf("http://127.0.1:%d%s", server.Port, server.SsePath)})
433+
location.UpdateDirective("proxy_pass", []string{fmt.Sprintf("http://127.0.0.1:%d%s", server.Port, server.SsePath)})
434434
location.ChangePath("^~", server.SsePath)
435435
if err = nginx.WriteConfig(config, nginx.IndentedStyle); err != nil {
436436
global.LOG.Errorf("write config failed, err: %v", buserr.WithErr(constant.ErrUpdateBuWebsite, err))
@@ -486,7 +486,7 @@ func addMCPProxy(websiteID uint) error {
486486
err = errors.New("error")
487487
return err
488488
}
489-
location.UpdateDirective("proxy_pass", []string{fmt.Sprintf("http://127.0.1:%d%s", server.Port, server.SsePath)})
489+
location.UpdateDirective("proxy_pass", []string{fmt.Sprintf("http://127.0.0.1:%d%s", server.Port, server.SsePath)})
490490
location.ChangePath("^~", server.SsePath)
491491
if err = nginx.WriteConfig(config, nginx.IndentedStyle); err != nil {
492492
return buserr.WithErr(constant.ErrUpdateBuWebsite, err)

0 commit comments

Comments
 (0)