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

Method UpdateRootLocation

agent/utils/nginx/components/server.go:341–353  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

339}
340
341func (s *Server) UpdateRootLocation() {
342 newDir := Directive{
343 Name: "location",
344 Parameters: []string{"/"},
345 Block: &Block{},
346 }
347 block := &Block{}
348 block.AppendDirectives(&Directive{
349 Name: "root",
350 Parameters: []string{"index.html"},
351 })
352 newDir.Block = block
353}
354
355func (s *Server) UpdateRootProxy(proxy []string) {
356 httpsProxy := len(proxy) > 0 && strings.HasPrefix(strings.ToLower(strings.TrimSpace(proxy[0])), "https://")

Callers 1

opWebsiteFunction · 0.80

Calls 1

AppendDirectivesMethod · 0.95

Tested by

no test coverage detected