gf/net/ghttp/ghttp_server_config_mess.go
2021-01-17 21:46:25 +08:00

29 lines
953 B
Go

// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package ghttp
// SetNameToUriType sets the NameToUriType for server.
func (s *Server) SetNameToUriType(t int) {
s.config.NameToUriType = t
}
// SetDumpRouterMap sets the DumpRouterMap for server.
// If DumpRouterMap is enabled, it automatically dumps the route map when server starts.
func (s *Server) SetDumpRouterMap(enabled bool) {
s.config.DumpRouterMap = enabled
}
// SetClientMaxBodySize sets the ClientMaxBodySize for server.
func (s *Server) SetClientMaxBodySize(maxSize int64) {
s.config.ClientMaxBodySize = maxSize
}
// SetFormParsingMemory sets the FormParsingMemory for server.
func (s *Server) SetFormParsingMemory(maxMemory int64) {
s.config.FormParsingMemory = maxMemory
}