modified: main_dc/yalarba/api_yal/go.mod

modified:   main_dc/yalarba/api_yal/go.sum
	modified:   main_dc/yalarba/api_yal/internal/config/config.go
	modified:   main_dc/yalarba/api_yal/internal/router/router.go
add stock middleware from chi
This commit is contained in:
2026-03-09 02:26:56 +05:00
parent 1e263cf1a2
commit 74b46a5109
4 changed files with 88 additions and 4 deletions
@@ -14,8 +14,16 @@ type Config struct {
ServerPort string
UploadPath string
LogLevel string
Environment string
Environment string `yaml:"environment" env:"ENVIRONMENT" default:"development"`
AppPort string
CORS struct {
AllowedOrigins []string `yaml:"allowed_origins" env:"CORS_ALLOWED_ORIGINS"`
} `yaml:"cors"`
RateLimit struct {
Enabled bool `yaml:"enabled" env:"RATE_LIMIT_ENABLED" default:"false"`
RequestsPerSecond int `yaml:"requests_per_second" env:"RATE_LIMIT_REQUESTS" default:"100"`
} `yaml:"rate_limit"`
}
func Load() *Config {