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

Method AddServerName

agent/utils/nginx/components/server.go:278–283  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

276}
277
278func (s *Server) AddServerName(name string) {
279 dirs := s.FindDirectives("server_name")
280 params := dirs[0].GetParameters()
281 params = append(params, name)
282 s.UpdateServerName(params)
283}
284
285func (s *Server) UpdateServerName(names []string) {
286 s.UpdateDirective("server_name", names)

Callers

nothing calls this directly

Calls 3

FindDirectivesMethod · 0.95
UpdateServerNameMethod · 0.95
GetParametersMethod · 0.65

Tested by

no test coverage detected