Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save talkingdotnet/2fd008cbca1f226b1eda31ee0fb089fb to your computer and use it in GitHub Desktop.
Save talkingdotnet/2fd008cbca1f226b1eda31ee0fb089fb to your computer and use it in GitHub Desktop.
public static class RegisterStartupMiddlewares
{
public static WebApplication SetupMiddleware(this WebApplication app)
{
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
return app;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment