Hi,
Is there a way to make changes to startup.cs persist?
Have a look at this
2 Likes
Thanks, that is exactly what I needed. Must have missed the bit neaer the bottom of the page for custom startup.
Update:
The custom partial class for startup does not work when trying to add UseForwardHeaders, I have to add it manually in startup.cs.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
.........
app.UseRouting();
// using Microsoft.AspNetCore.HttpOverrides;
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
app.UseAuthentication();
app.UseAuthorization();
........
Any ideas?