INNER CODE UNIT · Go
func
andrearaponi/dito · config/config.go:234
func (lc *LocationConfig) GetEffectiveMaxResponseBodySize(globalLimit int64) int64 {
// If location has a specific limit, use it
if lc.MaxResponseBodySize > 0 {
return lc.MaxResponseBodySize
}
// Otherwise, use the global limit
return globalLimit
}
// UpdateConfig updates the current configuration with a new configuration.
//
// Parameters:
// - newConfig: A pointer to the new ProxyConfig.
func UpdateConfig(newConfig *ProxyConfig) {
currentConfig.Store(newConfig)
if !newConfig.Logging.Enabled {
log.SetOutput(io.Discard)
} else {