diff --git a/DiscImageChef.Server/Properties/launchSettings.json b/DiscImageChef.Server/Properties/launchSettings.json index 918f69b4..d1117ef6 100644 --- a/DiscImageChef.Server/Properties/launchSettings.json +++ b/DiscImageChef.Server/Properties/launchSettings.json @@ -1,7 +1,7 @@ { "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, + "windowsAuthentication": false, + "anonymousAuthentication": true, "iisExpress": { "applicationUrl": "http://localhost:62005", "sslPort": 44393 @@ -18,7 +18,7 @@ "DiscImageChef.Server": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "https://localhost:5001;http://localhost:5000", + "applicationUrl": "http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/DiscImageChef.Server/Startup.cs b/DiscImageChef.Server/Startup.cs index 2f1f2687..6274ad2f 100644 --- a/DiscImageChef.Server/Startup.cs +++ b/DiscImageChef.Server/Startup.cs @@ -1,6 +1,7 @@ using DiscImageChef.Server.Models; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; @@ -30,6 +31,11 @@ namespace DiscImageChef.Server // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { + app.UseForwardedHeaders(new ForwardedHeadersOptions + { + ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto + }); + if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); @@ -41,7 +47,6 @@ namespace DiscImageChef.Server app.UseHsts(); } - //app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting();