diff --git a/GerstITS.Examples.Api/GerstITS.Examples.Api.csproj b/GerstITS.Examples.Api/GerstITS.Examples.Api.csproj index 865c751..a9decd7 100644 --- a/GerstITS.Examples.Api/GerstITS.Examples.Api.csproj +++ b/GerstITS.Examples.Api/GerstITS.Examples.Api.csproj @@ -37,20 +37,20 @@ - + - + - + - - + + diff --git a/GerstITS.Examples.Api/Startup.cs b/GerstITS.Examples.Api/Startup.cs index 649ea1e..f55f7eb 100644 --- a/GerstITS.Examples.Api/Startup.cs +++ b/GerstITS.Examples.Api/Startup.cs @@ -1,6 +1,6 @@ using GerstITS.Web.Api; -using GerstITS.Web.Api.Builder; using GerstITS.Web.Api.Hosting; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; @@ -12,19 +12,21 @@ namespace GerstITS.Examples.Api protected override void ConfigureApplication(IApplicationBuilder applicationBuilder, IWebHostEnvironment webHostEnvironment) { - if (webHostEnvironment.IsDevelopment()) + if (webHostEnvironment.IsProduction()) + applicationBuilder.UseHstsOfServerConfiguration(); + else applicationBuilder.UseDeveloperExceptionPage() .UseSwagger(); - else - applicationBuilder.UseHsts(); - applicationBuilder.UseHttpsRedirection() + applicationBuilder.UseCorsOfServerConfiguration() + .UseForwardedHeadersOfServerConfiguration() + .UseHttpsRedirectionOfServerConfiguration() .UseAuthentication() .UseAuthorization() .UseRouting() .UseEndpoints(endpoints => endpoints.MapControllers()) .UseRewriteUnknownPathsToIndexSite(ApplicationEnvironment.WebApi.BaseUrl) - .UseStaticFiles(); + .UseSystemIndependentStaticFiles(); } #endregion diff --git a/GerstITS.Examples.Jobs.SayHelloWorld/GerstITS.Examples.Jobs.SayHelloWorld.csproj b/GerstITS.Examples.Jobs.SayHelloWorld/GerstITS.Examples.Jobs.SayHelloWorld.csproj index 0f4e622..1a58738 100644 --- a/GerstITS.Examples.Jobs.SayHelloWorld/GerstITS.Examples.Jobs.SayHelloWorld.csproj +++ b/GerstITS.Examples.Jobs.SayHelloWorld/GerstITS.Examples.Jobs.SayHelloWorld.csproj @@ -34,7 +34,7 @@ - + diff --git a/GerstITS.Examples.Logic/GerstITS.Examples.Logic.csproj b/GerstITS.Examples.Logic/GerstITS.Examples.Logic.csproj index a9d4519..11d93a9 100644 --- a/GerstITS.Examples.Logic/GerstITS.Examples.Logic.csproj +++ b/GerstITS.Examples.Logic/GerstITS.Examples.Logic.csproj @@ -36,11 +36,11 @@ - + - + diff --git a/GerstITS.Examples.WebClient.Console/GerstITS.Examples.WebClient.Console.csproj b/GerstITS.Examples.WebClient.Console/GerstITS.Examples.WebClient.Console.csproj index 76b8394..a25f2b9 100644 --- a/GerstITS.Examples.WebClient.Console/GerstITS.Examples.WebClient.Console.csproj +++ b/GerstITS.Examples.WebClient.Console/GerstITS.Examples.WebClient.Console.csproj @@ -43,9 +43,9 @@ - + - + diff --git a/GerstITS.WebClients.Example.Api/GerstITS.Examples.WebClients.Examples.Api.csproj b/GerstITS.WebClients.Example.Api/GerstITS.Examples.WebClients.Examples.Api.csproj index 7a0b5aa..7a79940 100644 --- a/GerstITS.WebClients.Example.Api/GerstITS.Examples.WebClients.Examples.Api.csproj +++ b/GerstITS.WebClients.Example.Api/GerstITS.Examples.WebClients.Examples.Api.csproj @@ -33,7 +33,7 @@ - +