From d1adf7f5d669b1fd92a81934202104e07fb9475e Mon Sep 17 00:00:00 2001 From: "gorbenko.pavel" Date: Tue, 28 Jul 2026 12:48:05 +0500 Subject: [PATCH 1/2] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA?= =?UTF-8?q?=D0=B8=20https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 11 +++++++++-- backend/src/Tnsu.ApprovalRoute.Api/Program.cs | 12 ++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a452920..cee303c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +node_modules/ +lib/ +dist/ +temp/ +*.sppkg +.heft/ +sharepoint/solution/ +.vs/ .env .env.local .env.example @@ -5,5 +13,4 @@ **/bin/ **/obj/ -.DS_Store -.vs/ \ No newline at end of file +.DS_Store \ No newline at end of file diff --git a/backend/src/Tnsu.ApprovalRoute.Api/Program.cs b/backend/src/Tnsu.ApprovalRoute.Api/Program.cs index cc44f22..12d7319 100644 --- a/backend/src/Tnsu.ApprovalRoute.Api/Program.cs +++ b/backend/src/Tnsu.ApprovalRoute.Api/Program.cs @@ -1,6 +1,7 @@ using System.Text.Json.Serialization; using Extensions.Hosting.AsyncInitialization; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.HttpOverrides; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.OpenApi; @@ -15,6 +16,15 @@ const string CorsPolicyName = "Frontend"; var builder = WebApplication.CreateBuilder(args); +builder.Services.Configure(options => +{ + options.ForwardedHeaders = + ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; + + options.KnownNetworks.Clear(); + options.KnownProxies.Clear(); +}); + var corsAllowedOrigins = builder.Configuration.GetSection("Cors:AllowedOrigins").Get() ?? []; builder.Services.AddCors(options => { @@ -61,6 +71,8 @@ builder.Services.ConfigureHttpJsonOptions(o => o.SerializerOptions.Converters.Ad var app = builder.Build(); +app.UseForwardedHeaders(); + app.MapOpenApi(); app.MapScalarApiReference(options => -- 2.34.1 From a53787a4c5d707cc8e276f75b89f3201c26f4040 Mon Sep 17 00:00:00 2001 From: "gorbenko.pavel" Date: Tue, 28 Jul 2026 12:56:23 +0500 Subject: [PATCH 2/2] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B2=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82=20=D0=B2=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=BD=D1=87=20=D1=81=D0=B5=D1=82=D1=82=D0=B8=D0=BD?= =?UTF-8?q?=D0=B3=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Properties/launchSettings.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/src/Tnsu.ApprovalRoute.Api/Properties/launchSettings.json b/backend/src/Tnsu.ApprovalRoute.Api/Properties/launchSettings.json index 543069b..750f03a 100644 --- a/backend/src/Tnsu.ApprovalRoute.Api/Properties/launchSettings.json +++ b/backend/src/Tnsu.ApprovalRoute.Api/Properties/launchSettings.json @@ -9,6 +9,15 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "https://localhost:5443;http://localhost:5080", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } } } } -- 2.34.1