v1.4: Segurança multi-tenant, file serving via API e UX humanizada
- Validação cross-tenant no login e rotas protegidas
- File serving via /api/files/{bucket}/{path} (eliminação DNS)
- Mensagens de erro humanizadas inline (sem pop-ups)
- Middleware tenant detection via headers customizados
- Upload de logos retorna URLs via API
- README atualizado com changelog v1.4 completo
This commit is contained in:
@@ -49,6 +49,7 @@ type SecurityConfig struct {
|
||||
// MinioConfig holds MinIO configuration
|
||||
type MinioConfig struct {
|
||||
Endpoint string
|
||||
PublicURL string // URL pública para acesso ao MinIO (para gerar links)
|
||||
RootUser string
|
||||
RootPassword string
|
||||
UseSSL bool
|
||||
@@ -64,9 +65,9 @@ func Load() *Config {
|
||||
}
|
||||
|
||||
// Rate limit: more lenient in dev, strict in prod
|
||||
maxAttempts := 30
|
||||
maxAttempts := 1000 // Aumentado drasticamente para evitar 429 durante debug
|
||||
if env == "production" {
|
||||
maxAttempts = 5
|
||||
maxAttempts = 100 // Mais restritivo em produção
|
||||
}
|
||||
|
||||
return &Config{
|
||||
@@ -102,6 +103,7 @@ func Load() *Config {
|
||||
},
|
||||
Minio: MinioConfig{
|
||||
Endpoint: getEnvOrDefault("MINIO_ENDPOINT", "minio:9000"),
|
||||
PublicURL: getEnvOrDefault("MINIO_PUBLIC_URL", "http://localhost:9000"),
|
||||
RootUser: getEnvOrDefault("MINIO_ROOT_USER", "minioadmin"),
|
||||
RootPassword: getEnvOrDefault("MINIO_ROOT_PASSWORD", "changeme"),
|
||||
UseSSL: getEnvOrDefault("MINIO_USE_SSL", "false") == "true",
|
||||
|
||||
Reference in New Issue
Block a user