MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / buildBatchInstallOpenclawAllowedOrigin

Function buildBatchInstallOpenclawAllowedOrigin

agent/app/service/agents.go:663–675  ·  view source on GitHub ↗
(req dto.AgentBatchInstallReq)

Source from the content-addressed store, hash-verified

661}
662
663func buildBatchInstallOpenclawAllowedOrigin(req dto.AgentBatchInstallReq) (string, error) {
664 host := ""
665 if value, err := settingRepo.GetValueByKey("SystemIP"); err == nil {
666 host = strings.TrimSpace(value)
667 }
668 if host == "" {
669 host = strings.TrimSpace(req.FallbackAccessHost)
670 }
671 if host == "" {
672 host = "127.0.0.1"
673 }
674 return buildOpenclawAllowedOrigin(openclawAllowedOriginScheme(req.AppVersion), host, req.WebUIPort)
675}
676
677func (a AgentService) ensureBatchInstallAccount(req dto.AgentBatchInstallReq) (uint, error) {
678 if !requiresAgentAccount(req.AgentType) {

Callers 1

BatchInstallMethod · 0.85

Calls 3

GetValueByKeyMethod · 0.65

Tested by

no test coverage detected