diff --git a/Transversal/Services/PuppeteerPdfGeneratorService.cs b/Transversal/Services/PuppeteerPdfGeneratorService.cs index c3f0f87..6119419 100644 --- a/Transversal/Services/PuppeteerPdfGeneratorService.cs +++ b/Transversal/Services/PuppeteerPdfGeneratorService.cs @@ -11,19 +11,12 @@ namespace Transversal.Services public PuppeteerPdfGeneratorService() { - // Descargar Chromium si no está - new BrowserFetcher().DownloadAsync().GetAwaiter().GetResult(); - - // Lanzar Chromium persistente + // NO USAR BrowserFetcher NUNCA en entorno productivo Docker _browser = Puppeteer.LaunchAsync(new LaunchOptions { Headless = true, - ExecutablePath = "/usr/bin/chromium", - Args = new[] - { - "--no-sandbox", - "--disable-setuid-sandbox" - } + ExecutablePath = "/usr/bin/chromium", // ruta de chromium en la imagen docker + Args = new[] { "--no-sandbox", "--disable-setuid-sandbox" } }).GetAwaiter().GetResult(); } public async Task GeneratePdfFromHtmlAsync(string htmlContent, PdfGenerationOptions options = null)