diff --git a/ReplayBrowser/Controllers/AccountController.cs b/ReplayBrowser/Controllers/AccountController.cs index 83928ad..b34eb09 100644 --- a/ReplayBrowser/Controllers/AccountController.cs +++ b/ReplayBrowser/Controllers/AccountController.cs @@ -19,7 +19,7 @@ public IActionResult Login() { return Challenge(new AuthenticationProperties { - RedirectUri = "/" + RedirectUri = _configuration["RedirectUri"] }); } diff --git a/ReplayBrowser/Startup.cs b/ReplayBrowser/Startup.cs index 4595978..34c1cb9 100644 --- a/ReplayBrowser/Startup.cs +++ b/ReplayBrowser/Startup.cs @@ -206,6 +206,12 @@ public void ConfigureServices(IServiceCollection services) public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { + app.Use((context, next) => + { + context.Request.Scheme = "https"; + return next(); + }); + if (!env.IsDevelopment()) { app.UseExceptionHandler("/Error", createScopeForErrors: true); @@ -237,12 +243,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) pattern: "api/{controller=Home}/{action=Index}/{id?}"); }); - app.Use((context, next) => - { - context.Request.Scheme = "https"; - return next(); - }); - app.UseHttpsRedirection(); app.UseForwardedHeaders(); app.UseRouting();