fix: tolerar URL de OCR con /extract incluido por error

Si en el panel se pega la URL completa (https://host/extract) en vez del
dominio base, el servicio duplicaba la ruta (.../extract/extract) y daba
404. normalizarUrl() ahora le quita el /extract final si ya viene, tanto
en el flujo real como en el boton "Probar conexion".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Lizandro
2026-08-11 00:34:27 +00:00
co-authored by Claude Sonnet 5
parent 7afd22d581
commit 978c7c1492
2 changed files with 9 additions and 2 deletions
@@ -182,7 +182,7 @@ class ShowConfiguracionChat extends Component
public function probarOcr(): void
{
$url = rtrim(trim($this->ocr_url ?: ChatConfig::get('ocr_url')), '/');
$url = \App\Services\OcrExtractionService::normalizarUrl($this->ocr_url ?: ChatConfig::get('ocr_url'));
$token = trim($this->ocr_token ?: ChatConfig::get('ocr_token'));
if (! $url) {