Skip to content

Commit f18de6d

Browse files
update
1 parent ed726f2 commit f18de6d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

EssentialCSharp.Web/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ private static void Main(string[] args)
145145
});
146146

147147
WebApplication app = builder.Build();
148+
app.Use((context, next) =>
149+
{
150+
context.Request.Scheme = "https";
151+
return next(context);
152+
});
148153

149154
app.UseForwardedHeaders();
150155

@@ -168,11 +173,6 @@ private static void Main(string[] args)
168173
app.UseAuthorization();
169174
app.UseMiddleware<ReferralMiddleware>();
170175

171-
app.Use((context, next) =>
172-
{
173-
context.Request.Scheme = "https";
174-
return next(context);
175-
});
176176

177177
app.MapRazorPages();
178178
app.MapDefaultControllerRoute();

0 commit comments

Comments
 (0)