From f5a321d8219a641b6171a8c54c8d45a41442b0f1 Mon Sep 17 00:00:00 2001 From: morbalint Date: Wed, 27 Dec 2023 17:05:24 +0100 Subject: [PATCH] fix google signin --- Kemkas.Web/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Kemkas.Web/Program.cs b/Kemkas.Web/Program.cs index 8822826..dcbdc28 100644 --- a/Kemkas.Web/Program.cs +++ b/Kemkas.Web/Program.cs @@ -69,6 +69,12 @@ if (app.Environment.IsDevelopment()) } else { + // Force HTTPS because prod environment is behind unmanaged proxy. + app.Use((context, next) => + { + context.Request.Scheme = "https"; + return next(context); + }); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); // TODO: check if this should be handled by proxy }