From da508f3015dd3e2e67f9123f76f1e6f364908fa6 Mon Sep 17 00:00:00 2001 From: Maciej Maciejewski Date: Sat, 4 Jan 2025 23:12:55 +0100 Subject: [PATCH] zmiana --- Program.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Program.cs b/Program.cs index 3d36ac7..1cb2684 100644 --- a/Program.cs +++ b/Program.cs @@ -38,6 +38,7 @@ using FirmTracker_Server.Services; using System.Reflection; using FirmTracker_Server.Mappings; using NuGet.Packaging; +using Microsoft.AspNetCore.DataProtection; @@ -72,7 +73,7 @@ namespace FirmTracker_Server TestClass test = new TestClass(); test.AddTestProduct(); QuestPDF.Settings.License = QuestPDF.Infrastructure.LicenseType.Community; - + builder.Services.AddDataProtection().DisableAutomaticKeyGeneration(); builder.Services.AddCors(options => { options.AddPolicy("AllowSpecificOrigin", @@ -106,9 +107,9 @@ namespace FirmTracker_Server var port = configSwagger.GetValue("Port", 5075); - var port2 = configSwagger.GetValue("Port", 7039); + // var port2 = configSwagger.GetValue("Port", 7039); app.Urls.Add($"http://*:{port}"); - app.Urls.Add($"https://*:{port2}"); + // app.Urls.Add($"https://*:{port2}"); try { @@ -119,14 +120,14 @@ namespace FirmTracker_Server c.RoutePrefix = "swagger"; }); Console.WriteLine("uruchomiono swaggera"); - app.UseHttpsRedirection(); + // app.UseHttpsRedirection(); } catch (Exception ex) { Console.WriteLine("Nie udało się uruchomić swaggera"); } - app.UseHttpsRedirection(); + // app.UseHttpsRedirection(); app.UseCors("AllowSpecificOrigin");