mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-22 01:02:28 +00:00
Use https redirection on non-debug builds
This commit is contained in:
parent
33f344f200
commit
dce683a58c
2 changed files with 8 additions and 2 deletions
|
@ -68,6 +68,10 @@ public class ApiStartup
|
||||||
|
|
||||||
app.UseMiddleware<RequestLogMiddleware>();
|
app.UseMiddleware<RequestLogMiddleware>();
|
||||||
|
|
||||||
|
#if !DEBUG
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
#endif
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseEndpoints(endpoints => endpoints.MapControllers());
|
app.UseEndpoints(endpoints => endpoints.MapControllers());
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,10 +56,12 @@ public class WebsiteStartup
|
||||||
|
|
||||||
app.UseMiddleware<RequestLogMiddleware>();
|
app.UseMiddleware<RequestLogMiddleware>();
|
||||||
|
|
||||||
|
#if !DEBUG
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
#endif
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
app.UseEndpoints(endpoints => endpoints.MapControllers());
|
app.UseEndpoints(endpoints => endpoints.MapControllers());
|
||||||
app.UseEndpoints(endpoints => endpoints.MapRazorPages());
|
app.UseEndpoints(endpoints => endpoints.MapRazorPages());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue