From 6e6d1dd55fadb6f2e4a45d62d5f3fb99e06b9ff4 Mon Sep 17 00:00:00 2001 From: Yuuki Wesp Date: Thu, 4 Jan 2024 18:15:52 +0300 Subject: [PATCH] fixes --- src/Program.cs | 12 +++++------- src/Properties/launchSettings.json | 2 +- src/core.csproj | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Program.cs b/src/Program.cs index ad374a2..d18bfc3 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -73,12 +73,10 @@ app.UseCors(app.Environment.IsDevelopment() ? "localhost" : "production"); app.UseAuthorization(); app.UseOperationCancelledMiddleware(); -app.UseForwardedHeaders(); -app.UseHttpsRedirection(); -app.UseEndpoints(endpoints => -{ - endpoints.MapHealthChecks("/health"); - endpoints.MapControllers(); -}); +app.UseForwardedHeaders(); +if (!app.Environment.IsDevelopment()) + app.UseHttpsRedirection(); +app.MapControllers(); +app.MapHealthChecks("/health"); app.Run(); diff --git a/src/Properties/launchSettings.json b/src/Properties/launchSettings.json index 45ab60e..9b77524 100644 --- a/src/Properties/launchSettings.json +++ b/src/Properties/launchSettings.json @@ -6,7 +6,7 @@ "launchBrowser": false, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", - "GOOGLE_APPLICATION_CREDENTIALS": "C:\\git\\additional-resource\\vein-lang-2ca627fcc703.json" + "GOOGLE_APPLICATION_CREDENTIALS": "C:\\git\\keys\\vein-lang.json" }, "applicationUrl": "https://localhost:8080;http://localhost:5062", "dotnetRunMessages": true diff --git a/src/core.csproj b/src/core.csproj index 0a9df18..c947997 100644 --- a/src/core.csproj +++ b/src/core.csproj @@ -23,7 +23,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - +