Stream WhisperX uploads safely

This commit is contained in:
2026-08-10 21:49:44 +00:00
parent 32653f54f9
commit 9da2c1e144
12 changed files with 542 additions and 56 deletions

View File

@@ -395,11 +395,11 @@ func validateWhisperX(cfg WhisperXConfig) error {
return fmt.Errorf("pipeline.whisperx.transcribe_url is required")
}
u, err := url.Parse(cfg.TranscribeURL)
if err != nil || u.Scheme == "" || u.Host == "" {
if err != nil || !u.IsAbs() || u.Host == "" || (strings.ToLower(u.Scheme) != "http" && strings.ToLower(u.Scheme) != "https") {
if err != nil {
return fmt.Errorf("pipeline.whisperx.transcribe_url must be a valid URL: %w", err)
return fmt.Errorf("pipeline.whisperx.transcribe_url must be an absolute http or https URL: %w", err)
}
return fmt.Errorf("pipeline.whisperx.transcribe_url must be a valid URL")
return fmt.Errorf("pipeline.whisperx.transcribe_url must be an absolute http or https URL")
}
if err := validateDuration("pipeline.whisperx.timeout", cfg.Timeout); err != nil {
return err